install apache benchmarking tool (ab) on windows

  1. download apache binaries from an apache recommended download site (i.e. :apache lounge)
  2. extract the content using zip tool
  3. copy the /bin/ab.exe to a folder of your choice (i.e.: c:\temp)
  4. start a command prompt and run it
ab -n 100 -c 10 http://yourserver/yourapi

or

# content.json contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
# -l Accept variable document length (use this for dynamic pages)

ab -p content.json -T application/json -H 'Authorization: Bearer xxxx' -c 10 -n 2000 -l http://myserver/myapi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s