bear / helloworld
n/a
0.1.0
2015-03-11 02:47 UTC
Requires
- bear/package: ~1.0@dev
- facebook/xhprof: dev-master
This package is auto-updated.
Last update: 2024-09-04 11:29:26 UTC
README
为BEAR.Sunday进行Hello World基准测试
安装
安装项目。
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
测试未使用ETag的缓存页面 without Etag。
ab -t 10 -c 10 http://127.0.0.1:8080/
要测试使用ETag的缓存页面,首先使用curl的-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/