Skip to content

Instantly share code, notes, and snippets.

@gwillem
Created November 26, 2014 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwillem/fd600be6bd37eb9aa4d7 to your computer and use it in GitHub Desktop.
Save gwillem/fd600be6bd37eb9aa4d7 to your computer and use it in GitHub Desktop.
Newrelic small benchmark
#!/bin/bash
set -e
function tt () {
curl -kso /dev/null -w "%{time_total}\n" $1
}
#alias ttfb='curl -kso /dev/null -w "%{time_starttransfer}\n"'
URL=http://willemnr.hypernode.io/zwangerschapskleding/
mv /etc/php5/conf.d/newrelic.ini /root
service php5-fpm restart
sleep 1
echo Testing WITHOUT newrelic
tt $URL
tt $URL
tt $URL
mv /root/newrelic.ini /etc/php5/conf.d/
service php5-fpm restart
sleep 1
echo Testing WITH newrelic
tt $URL
tt $URL
tt $URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment