{"id":17348362,"url":"https://github.com/jmervine/php-httperf","last_synced_at":"2025-03-27T11:40:34.129Z","repository":{"id":16254037,"uuid":"19001985","full_name":"jmervine/php-httperf","owner":"jmervine","description":"Simple PHP Port of HTTPerf.rb [https://github.com/jmervine/httperfrb]","archived":false,"fork":false,"pushed_at":"2014-04-28T18:46:47.000Z","size":208,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-01T16:12:51.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jmervine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-21T18:20:26.000Z","updated_at":"2014-11-10T01:46:07.000Z","dependencies_parsed_at":"2022-09-24T11:41:39.446Z","dependency_job_id":null,"html_url":"https://github.com/jmervine/php-httperf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fphp-httperf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fphp-httperf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fphp-httperf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fphp-httperf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmervine","download_url":"https://codeload.github.com/jmervine/php-httperf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245840463,"owners_count":20681164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T16:52:07.368Z","updated_at":"2025-03-27T11:40:34.085Z","avatar_url":"https://github.com/jmervine.png","language":"PHP","readme":"HTTPerf.php [![Build Status](https://travis-ci.org/jmervine/php-httperf.svg?branch=master)](https://travis-ci.org/jmervine/php-httperf)\n-----------\n\n##### Simple PHP port of [HTTPerf.rb](https://github.com/jmervine/httperfrb)\n\n\u003e Should be condiered in development, or beta. Pull requests welcome, see [dev notes](#development) below.\n\nSimple PHP interface for [httperf](http://mervine.net/httperf).\n\nTested via [Travis-CI](https://travis-ci.org/jmervine/php-httperf) on:\n\n* PHP 5.3\n* PHP 5.4\n* PHP 5.5\n* HHVM\n\n## Installing 'httperf'\n\nRequires [httperf](http://mervine.net/httperf), of course...\n\n#### Mac\n\n    sudo port install httperf\n\n#### Debian / Ubuntu\n\n    sudo apt-get install httperf\n\n#### Redhat / CentOS\n\n    sudo yum install httperf\n\n#### My 'httperf'\n\nSee: [httperf-0.9.1 with individual connection times](http://mervine.net/httperf-0-9-1-with-individual-connection-times).\n\n\n## Basic Usage\n\n``` php\n\u003c?php\nrequire_once 'HTTPerf.php';\n\n$options = array(\n    \"server\"    =\u003e \"www.example.com\",\n    \"uri\"       =\u003e \"/foo/bar\",\n    \"rate\"      =\u003e 10,\n    \"num-conns\" =\u003e 1000,\n    \"verbose\"   =\u003e true,\n    \"hog\"       =\u003e true,\n    \"parse\"     =\u003e true\n);\n\n$httperf = new HTTPerf($options);\n$results = $httperf-\u003erun();\nprint_r($results);\n\n$httperf-\u003eupdateOptions(\"uri\", \"www.google.com\");\n$results = $httperf-\u003erun();\nprint_r($results);\n\n```\n\n#### Forking\n\n``` php\n\u003c?php\nrequire_once \"HTTPerf.php\";\n\n$httperf = new HTTPerf(array(\n  \"server\"    =\u003e \"www.example.com\",\n  \"rate\"      =\u003e 5,\n  \"num-conns\" =\u003e 10,\n  \"parse\"     =\u003e true,\n  \"verbose\"   =\u003e true\n));\n\necho \"Running: \";\necho $httperf-\u003ecommand() . \"\\n\";\n\n/**\n * Example 1 - Fork and wait.\n ******************************************/\n$proc = $httperf-\u003efork();\nprint_r($httperf-\u003eforkWait(1, function() {\n  echo \"forkWait: waiting...\\n\";\n}));\n\necho \"----\\n\";\necho \"Running: \";\necho $httperf-\u003ecommand() . \"\\n\";\n\n/**\n * Example 1 - Fork check if running.\n ******************************************/\n$proc = $httperf-\u003efork();\nwhile ($httperf-\u003eforkRunning()) {\n  echo \"fork running...\\n\";\n  sleep(1);\n}\n\nprint_r($httperf-\u003eresult);\n\n```\n\n## Development\n\nPlease 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.\n\n```\nmake test\n```\n\n","funding_links":[],"categories":["Web server Benchmarks","Webserver Benchmarks"],"sub_categories":["Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmervine%2Fphp-httperf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmervine%2Fphp-httperf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmervine%2Fphp-httperf/lists"}