User Tools

Site Tools


testing:simple_bash_curl_load_testing

Following script has been used to quickly do some loadtesting of EMS. It is not intended to be used for 'production' purposes (we might consider using JMeter or Gatling for that). It was just a quickest way to do the load test at the moment.

Script:

for i in {1..50}; do curl -s -w "%{time_total}\n" -o /dev/null 'https://sfqa.errigal.com/SnmpManager/gwt/com.errigal.ems.ErrigalEMS/rpc' -H 'Cookie: JSESSIONID=0F5A5485A74B12E1238C7FD00FB6D64E.SnmpManagerWorker1' -H 'Origin: https://sfqa.errigal.com' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: en-US,en;q=0.8,cs;q=0.6' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36' -H 'Content-Type: text/x-gwt-rpc; charset=UTF-8' -H 'Accept: */*' -H 'X-GWT-Module-Base: https://sfqa.errigal.com/SnmpManager/gwt/com.errigal.ems.ErrigalEMS/' -H 'X-GWT-Permutation: F263148C8B87EF198C26C26A9DA28F56' -H 'Referer: https://sfqa.errigal.com/SnmpManager/errigalEMS' -H 'Connection: keep-alive' --data-binary '7|0|7|https://sfqa.errigal.com/SnmpManager/gwt/com.errigal.ems.ErrigalEMS/|2B46FE4CE90BA953AA4D29A4E086985E|grails.plugins.gwt.client.GwtActionService|execute|grails.plugins.gwt.shared.Action|com.errigal.ems.client.RetrieveTreeViewInfoAction/3812844218|com.errigal.ems.client.enums.ElementType/26007214|1|2|3|4|1|5|6|0|0|0|0|A|0|0|7|0|' --compressed & done

In the start of the script you can set the concurrent requests (50 in this sample). The curl part except for -s -w “%{time_total}\n” -o /dev/null can be obtained in Chrome as depicted on this screenshot:

testing/simple_bash_curl_load_testing.txt · Last modified: 2021/06/25 10:09 by 127.0.0.1