Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nodejs-toolbox/fork_commandline_node-hammer

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
7 Commits
 
 
 
 
 
 

Repository files navigation

Use this lib to issue requests against the some url. You can define the number of simultaneous clients and how many requests they'll issue. You wanna submit form variables with your requests? No, problem.

Node Compatibility

This library was tested with node v0.1.101.

Hammer Time!

See help:

$ node hammer.js --help 

This command fires up 5 clients and issues 10K requests per client:

$ node hammer.js GET http://localhost:8000/ 5 10000

Form Parameters

If you need to submit form variables then create a file and place it in the form directory. The data object is then copied to either the querystring (GET) or body (POST) for each request.

Example from test.js:

exports.data = {'foo':'bar'}

Run command:

$ node hammer.js POST http://localhost:8000/ 5 10000 --form=./form/test.js

This file is required so make sure you use ./

Simple Report

When the process finishes, you'll see a report like this:

Request method: POST
Request uri: http://localhost:8000/
Num of clients: 5
Requests per client: 1000

Total requests: 5000
Average response time: 0.0059382000000001295 (ms)
Requests per second: 714.2857142857143
Errors: 0

About

Command line load testing tool via nodejs. Think AB, but with less features.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.