Skip to content

Instantly share code, notes, and snippets.

@szabacsik
Last active February 11, 2022 14:22
Show Gist options
  • Save szabacsik/72defc0338c4088cb7054bf210741f3c to your computer and use it in GitHub Desktop.
Save szabacsik/72defc0338c4088cb7054bf210741f3c to your computer and use it in GitHub Desktop.
Measuring web page load, benchmark or performance

Test webpage loading speed with Curl

curl -s -w 'Testing Website Response Time for: %{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_co
nnect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null ADDRESS

https://www.techrepublic.com/article/how-to-test-a-website-loading-speed-using-the-curl-command

Test webpage loading speed with wget and time

time wget --quiet --output-document=/dev/null http://httpbin.org/delay/3

Load testing with siege

siege --concurrent=1 --delay=0 --time=60s http://httpbin.org/delay/1
siege --concurrent=1 --benchmark --time=60s http://httpbin.org/delay/1
siege --concurrent=1 --reps=1 --benchmark --print "https://httpbin.org/post POST {\"name\":\"John Doe\"}" --content-type "application/json"
siege --concurrent=1 --reps=1 --benchmark --print http://httpbin.org/delay/1

https://www.joedog.org/siege-manual/

Load testing with Apache Bench

 ab -n 100 -c 10 http://httpbin.org/anything/

https://httpd.apache.org/docs/2.4/programs/ab.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment