PHP uses AB in Apache to test the website's stress performance. Open the installation tool of the apacheserver (wampserverplugin is used, and an executable program of AB .exe is included in the bindirectory, which is the stress testing tool to be introduced. Run commands on Windows to open the installation path of the Apache server (wampserverplugin is used, and an executable program of AB .exe is included in the bindirectory. it is the stress testing tool to be introduced.
In the command line of the Windows system, enter the AB .exeprogram directory and execute the AB .exe program. Note that double-click fails to run correctly. <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + ICAgICAgICBkOii72LO1L734yOtExcwpPGJyPgo8L3A + CjxwPiA8aW1nIHNyYz0 = "http://www.2cto.com/uploadfile/Collfiles/20140614/20140614091704240.jpg" alt = "\">
Cd wamp \ bin \ apache \ Apache2.4.4 \ bin (press ENTER/enter the bin directory)
AB (press ENTER /)
If you see the following help information, it means that AB is successfully started.
Start AB stress testing
AB-n 5000-c 200 http: // localhost/test. php
In the preceding example, the total number of accesses to the http: // localhost/test. php script is 5000, which is 200 concurrent (simulating simultaneous access by 200 users ).
Common AB parameters:
-N: total number of requests executed. the default value is 1;
-C: Number of concurrencies. the default value is 1;
-T: The total time of the test, in seconds. the default value is 50000 s.
-P: Data File during POST
-W: output results in HTML table format
Example (I use wampserverexample, and there is an executable program of AB .exe in the bindirectory. it is the stress testing tool to be introduced. Commands in Windows...