Skip to content

Instantly share code, notes, and snippets.

@mrded
Created February 10, 2017 17:59
Show Gist options
  • Save mrded/60489ba7ef63d29ca5efb1b2a4daf0f2 to your computer and use it in GitHub Desktop.
Save mrded/60489ba7ef63d29ca5efb1b2a4daf0f2 to your computer and use it in GitHub Desktop.
Simple wrapper around Apache benchmark
#!/bin/bash
# Copy into /usr/local/bin/benchmark
# Give permissions: chmod +x /usr/local/bin/benchmark
# Usage: `benchmark http://example.com`
ab -n20 -c1 $1 | grep 'Requests per second\|Time per request\|Transfer rate\|Total transferred'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment