Skip to content

Instantly share code, notes, and snippets.

@vpnwall-services
Created October 19, 2020 15:16
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 vpnwall-services/ed4c8f1d32f64e8ebc3b98b094ebcf8b to your computer and use it in GitHub Desktop.
Save vpnwall-services/ed4c8f1d32f64e8ebc3b98b094ebcf8b to your computer and use it in GitHub Desktop.
[Apache2 Benchmarking 101] Apache2 benchmarking 101 #bash #apache2 #benchmarking #101 #debian

APACHE2 BECNHMARKING 101

Simple becnhmark

ab -t 30 -n 16000 -c 100 https://myurl.local/

Becnhmark while connected with curl request use

Visit website and login, then, go to desired URL
Open Firefox developer console
Find request in Network tab
Copy as > Copy as curl

Then use ab like this

ab -H "'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0' -H 'Accept: application/json' -H 'Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3' --compressed -H 'X-Requested-With: XMLHttpRequest' -H 'X-CSRF-TOKEN: blablou' -H 'Content-Type: application/json;charset=utf-8' -H 'X-XSRF-TOKEN: CSSSSSSSSSSSSSRRRRRRRRFFFFFTOKEN' -H 'Origin: https://myurl.local' -H 'Connection: keep-alive' -H 'Referer: https://myurl.local/application' -H 'Cookie: __token=cooooooookie; my_cookie_session=sessions; XSRF-TOKEN=CSSSSSSSSSSSSSRRRRRRRRFFFFFTOKEN' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' --data-raw '{"arg":1,"per_page":10}'" -n 10000 -c 1000 https://myurl.local/application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment