tommygun
HTTP Benchmarking Tool written in Node.JS.
Installation
NPM
npm install -g tommygun
Git
git clone git://github.com/brettlangdon/tommygun.gitcd ./tommygunnpm install -g
Configuration
Tommygun uses ini files to specify what urls and settings to test. Each section corresponds to the url to test and each property corresponds to specific settings for that given url.
The options available for each url are the same as those available to http.request
(http://nodejs.org/api/http.html#http_http_request_options_callback).
When using the configuration setting headers
you must provide the value as a valid JSON string.
Example
[localhost]port = 8000num = 5 [localhost/submit]port = 8000data = this is a testheaders = {"some": "values"}method = postnum = 2 [www.google.com] [www.github.com]
Usage
Get Help
tommygun --helpUsage: tommygun [config] [config]... Options: -c, --concurrency Number of Concurrent Clients to Use [default: 1] -n, --requests Total Number Of Requests To Make -r, --random Whether Or Not To Randomize The Url Order [boolean] [default: false] -k, --keepalive Whether Or Not To Enable Keep Alive Support [boolean] [default: false] -l, --log Log File To Write All Request Data To [string] -s, --stats Whether or Not Print Result Stats [boolean] [default: true] -q, --quiet Whether Or Not To Silence stdout [boolean] [default: false] -h, --help Show This Help Text [boolean]
Simple Usage
Config
[localhost]port=8000
Benchmark
tommygun -c 10 -n 1000 config.ini
Results
Starting Up 10 ClientsQueuing Up 1000 RequestsFinishedElapsed Time : 0.233Completed Requests: 1000Errors: 0Requests per Second: 4291.845493562231Processing ResultsResults For: http://localhost/ Total Requests: 1000 Mean Time : 2.159 Min Time : 1 Max Time : 16 Total Time : 2159 50% : 2 60% : 2 70% : 2 80% : 3 90% : 4 95% : 6 98% : 8 99% : 10 Status Code Distribution: 200 514 404 486
Name
The name for tommygun came from a play off of the name for http://www.github.com/newsapps/beeswithmachineguns
License
(The MIT License)
Copyright (c) 2012 Brett Langdon <brett@blangdon.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.