Simple PHP port of HTTPerf.rb
Simple PHP interface for httperf.
Tested via Travis-CI on:
- PHP 5.3
- PHP 5.4
- PHP 5.5
- HHVM
Requires httperf, of course...
sudo port install httperf
sudo apt-get install httperf
sudo yum install httperf
See: httperf-0.9.1 with individual connection times.
<?php
require_once 'HTTPerf.php';
$options = array(
"server" => "www.example.com",
"uri" => "/foo/bar",
"rate" => 10,
"num-conns" => 1000,
"verbose" => true,
"hog" => true,
"parse" => true
);
$httperf = new HTTPerf();
$results = $httperf->run();
print_r($results);
$httperf->updateOptions("uri", "www.google.com");
$results = $httperf->run();
print_r($results);
Please feel free to submit pull requests as this is my first stab at PHP in about 10 years. Before submitting a pull request, though, please make sure to update (if necessary) and run unit tests.
make test