Skip to content

Instantly share code, notes, and snippets.

@gfrison
Last active September 27, 2015 23:18
Show Gist options
  • Save gfrison/1348082 to your computer and use it in GitHub Desktop.
Save gfrison/1348082 to your computer and use it in GitHub Desktop.
script bash for performance testing on RESTful services. It measures quickly how long does it take accomplish http requests
#!/bin/bash
START=$(date +%s.%N)
for i in {1..100};
do
curl http://localhosT:3000/rest -d '<request>'>/dev/null 2>&1
done;
END=$(date +%s.%N)
DIFF=$(echo "$END - $START" | bc)
echo "diff:"+$DIFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment