05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Completed 300 requests<br />

Completed 400 requests<br />

Completed 500 requests<br />

Completed 600 requests<br />

Completed 700 requests<br />

Completed 800 requests<br />

Completed 900 requests<br />

Finished 1000 requests<br />

Server Software: Apache/1.3.22<br />

Server Hostname: localhost<br />

Server Port: 80<br />

Document Path: /info.php<br />

Document Length: 49414 bytes<br />

Concurrency Level: 10<br />

Time taken for tests: 8.198 seconds<br />

Complete requests: 1000<br />

Failed requests: 0<br />

Broken pipe errors: 0<br />

Total transferred: 49900378 bytes<br />

HTML transferred: 49679845 bytes<br />

Requests per second: 121.98 [#/sec] (mean)<br />

Time per request: 81.98 [ms] (mean)<br />

Time per request: 8.20 [ms] (mean, across all concurrent requests)<br />

Transfer rate: 6086.90 [Kbytes/sec] received<br />

Connnection Times (ms)<br />

min mean[+/-sd] median max<br />

Connect: 0 12 16.9 1 72<br />

Processing: 7 69 68.5 58 596<br />

Waiting: 0 64 69.4 50 596<br />

Total: 7 81 66.5 79 596<br />

Percentage of the requests served within a certain time (ms)<br />

50% 79<br />

66% 80<br />

75% 83<br />

80% 84<br />

90% 158<br />

95% 221<br />

98% 268<br />

99% 288<br />

100% 596 (last request)<br />

If your <strong>PHP</strong> script uses sessions, the results you get from ab will not be representative<br />

of the real-world performance of the scripts. Since a session is locked across a<br />

request, results from the concurrent requests run by ab will be extremely poor. However,<br />

in normal usage, a session is typically associated with a single user, who isn’t<br />

likely to make concurrent requests.<br />

Using ab tells you the overall speed of your page but gives you no information on the<br />

speed of individual functions of blocks of code within the page. Use ab to test<br />

310 | Chapter 13: Application Techniques<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!