{"id":17348357,"url":"https://github.com/jmervine/httperfjs","last_synced_at":"2025-04-14T20:55:15.586Z","repository":{"id":9339316,"uuid":"11187523","full_name":"jmervine/httperfjs","owner":"jmervine","description":"NodeJS port of HTTPerf.rb","archived":false,"fork":false,"pushed_at":"2014-02-28T00:28:52.000Z","size":279,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T09:11:13.317Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-07-04T22:15:29.000Z","updated_at":"2022-10-31T17:23:50.000Z","dependencies_parsed_at":"2022-09-10T18:50:56.030Z","dependency_job_id":null,"html_url":"https://github.com/jmervine/httperfjs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fhttperfjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fhttperfjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fhttperfjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmervine%2Fhttperfjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmervine","download_url":"https://codeload.github.com/jmervine/httperfjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248961121,"owners_count":21189991,"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:05.116Z","updated_at":"2025-04-14T20:55:15.560Z","avatar_url":"https://github.com/jmervine.png","language":"JavaScript","readme":"# HTTPerf.js\n\n[![Build Status](https://travis-ci.org/jmervine/httperfjs.png?branch=master)](https://travis-ci.org/jmervine/httperfjs) \u0026nbsp; [![Dependancy Status](https://david-dm.org/jmervine/httperfjs.png)](https://david-dm.org/jmervine/httperfjs) \u0026nbsp; [![NPM Version](https://badge.fury.io/js/httperfjs.png)](https://badge.fury.io/js/httperfjs)\n\nSimple Node.js interface for httperf. This is a node port of [HTTPerf.rb](http://mervine.net/gems/httperfrb) and\nworks pretty much the same way.\n\n\u003e What hasn't been ported or is different from the [ruby version](http://mervine.net/gems/httperfrb):\n\u003e\n\u003e - `parse` is true by default.\n\u003e - `tee` isn't currently supported.\n\u003e - `httperf` must be in your `PATH`\n\n### Links\n\n* [package](https://npmjs.org/package/httperfjs)\n* [source](http://github.com/jmervine/httperfjs)\n* [tests](https://travis-ci.org/jmervine/httperfjs)\n\n### Node.js Version\n\nTested on the following node versions (via [Travis-ci.org](http://travis-ci.org/):\n\n- 0.10\n- 0.11\n\n### Installation\n\n    $ npm install httperfjs\n\n### Basic usage:\n\n    :::js\n    var HTTPerf = require('httperfjs');\n\n    var httperf = new HTTPerf({\n        \"server\": \"mervine.net\",\n        \"verbose\": true,\n        \"hog\": true,\n        \"uri\": \"/about\",\n        \"num-conns\": 100}\n    );\n\n    httperf.run(function (result) {\n        console.log(result);\n        console.log(result.connection_time_avg);\n    });\n    // =\u003e { object with httperf values }\n    // =\u003e '123.4'\n\n    httperf.parse = false;\n    var child = httperf.run(function (result) {\n        console.log(result);\n    });\n    // =\u003e \"string with httperf stdout\"\n\n    // httperf dumps data on SIGINT (crtl-c), HTTPerf's run\n    // supports this as well, with the following addition\n    // to your scripts\n    process.on('SIGINT', function() {\n        child.send('SIGINT');\n    });\n\n\n#### NodeUnit Benchmark Example\n\n    :::js\n    // file: ./test/benchmark.js\n    var HTTPerf = require('httperfjs');\n    var httperf = new HTTPerf({\n        server:      \"mervine.net\",\n        uri:         \"/\",\n        \"num-conns\": 9\n    });\n\n    var run;\n\n    module.exports = {\n        tearDown: function (callback) {\n            run = undefined;\n            callback();\n        },\n\n        'homepage should be quick': function (test) {\n            test.expect(1);\n            httperf.run( function (run) {\n                test.ok(run.connection_time_median \u003c 200,\n                    \"homepage was too slow: got \" + run.connection_time_median\n                       + \" but expected: \u003c 200\");\n                test.done();\n            });\n        },\n\n        'archive should be quick': function (test) {\n            test.expect(1);\n            httperf.run( function (run) {\n                test.ok(run.connection_time_median \u003c 200,\n                    \"archive was too slow: got \" + run.connection_time_avg\n                        + \" but expected: \u003c 200\");\n                test.done();\n            });\n        }\n    };\n    // $ ./node_modules/.bin/nodeunit ./test/benchmark.js\n\n\n#### Parser Keys:\n\n    command\n    max_connect_burst_length\n    total_connections\n    total_requests\n    total_replies\n    total_test_duration\n    connection_rate_per_sec\n    connection_rate_ms_conn\n    connection_time_min\n    connection_time_avg\n    connection_time_max\n    connection_time_median\n    connection_time_stddev\n    connection_time_connect\n    connection_length\n    request_rate_per_sec\n    request_rate_ms_request\n    request_size\n    reply_rate_min\n    reply_rate_avg\n    reply_rate_max\n    reply_rate_stddev\n    reply_rate_samples\n    reply_time_response\n    reply_time_transfer\n    reply_size_header\n    reply_size_content\n    reply_size_footer\n    reply_size_total\n    reply_status_1xx\n    reply_status_2xx\n    reply_status_3xx\n    reply_status_4xx\n    reply_status_5xx\n    cpu_time_user_sec\n    cpu_time_system_sec\n    cpu_time_user_pct\n    cpu_time_system_pct\n    cpu_time_total_pct\n    net_io_kb_sec\n    net_io_bps\n    errors_total\n    errors_client_timeout\n    errors_socket_timeout\n    errors_conn_refused\n    errors_conn_reset\n    errors_fd_unavail\n    errors_addr_unavail\n    errors_ftab_full\n    errors_other\n\n#### Verbose Percentile Parser Keys:\n\nThese require a non-standard version of `httperf`. See: [httperf-0.9.1 with individual connection times](http://mervine.net/httperf-0-9-1-with-individual-connection-times).\n\n    connection_time_75_pct\n    connection_time_80_pct\n    connection_time_85_pct\n    connection_time_90_pct\n    connection_time_95_pct\n    connection_time_99_pct\n\n\n#### Accepted Options:\n\n    \"add-header\"\n    \"burst-length\"\n    \"client\"\n    \"close-with-reset\"\n    \"debug\"\n    \"failure-status\"\n    \"hog\"\n    \"http-version\"\n    \"max-connections\"\n    \"max-piped-calls\"\n    \"method\"\n    \"no-host-hdr\"\n    \"num-calls\"\n    \"num-conns\"\n    \"period\"\n    \"port\"\n    \"print-reply\"\n    \"print-request\"\n    \"rate\"\n    \"recv-buffer\"\n    \"retry-on-failure\"\n    \"send-buffer\"\n    \"server\"\n    \"server-name\"\n    \"session-cookies\"\n    \"ssl\"\n    \"ssl-ciphers\"\n    \"ssl-no-reuse\"\n    \"think-timeout\"\n    \"timeout\"\n    \"uri\"\n    \"verbose\"\n    \"version\"\n    \"wlog\"\n    \"wsess\"\n    \"wsesslog\"\n    \"wset\"\n","funding_links":[],"categories":["Webserver Benchmarks","Web server Benchmarks"],"sub_categories":["Meetups"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmervine%2Fhttperfjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmervine%2Fhttperfjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmervine%2Fhttperfjs/lists"}