BEAR.HelloWorld
initial release
Bear. Sunday의 Hello World Benchmarking
프로젝트를 설치하십시오.
git clone https://github.com/bearsunday/BEAR.HelloWorld.git
cd BEAR.HelloWorld
composer install --no-dev --optimize-autoloader
PHP 서버를 시작하십시오
php -S 127.0.0.1:8080 var/www/index.php
원시 페이지를 테스트하십시오.
ab -t 10 -c 10 http://127.0.0.1:8080/raw
테스트 캐시 된 페이지 Witout Etag.
ab -t 10 -c 10 http://127.0.0.1:8080/
ETAG 로 캐시 된 페이지를 테스트하려면 먼저 -v 옵션으로 말리십시오.
curl -v http://127.0.0.1:8080/
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.38.0
> Host: 127.0.0.1:8080
> Accept: */*
>
< HTTP/1.1 200 OK
< Host: 127.0.0.1:8080
< Connection: close
< X-Powered-By: PHP/5.6.5
< Etag: 2669725389
< Last-Modified: Wed, 11 Mar 2015 01:40:14 GMT
< Content-type: text/html; charset=UTF-8
<
If-None-Match 헤더와 함께 요청하고 테스트를위한 Etag 값을 찾았습니다.
ab -H "If-None-Match: 2669725389" -t 10 -c 10 http://127.0.0.1:8080/