These scripts will help get the best from wg/wrk (https://github.com/wg/wrk)
Example:
$ head useragents.lst
Mozilla/5.0 (PLAYSTATION 3; 3.55)
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Xbox; Xbox One)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; Xbox; Xbox One) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
Mozilla/5.0 (PlayStation 4 1.51) AppleWebKit/536.26 (KHTML, like Gecko)
Mozilla/5.0 (Linux; Android 4.4.2; A1-840FHD Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.94 Safari/537.36
Mozilla/5.0 (Linux; Android 4.4.2; en-us; SAMSUNG SM-N9005 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94
Mozilla/5.0 (Linux; Android 5.0; Nexus 9 Build/LRX21R) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.509 Safari/537.36
Mozilla/5.0 (X11; Linux) AppleWebKit/534.34 (KHTML, like Gecko) QtCarBrowser Safari/534.34
Mozilla/5.0 (Linux; Android 4.4.3; KFTHWI Build/KTU84M) AppleWebKit/537.36 (KHTML, like Gecko) Silk/44.1.54 like Chrome/44.0.2403.63 Safari/537.36
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.13.81_10003810) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true
$ docker run --rm -v "$(pwd)":/data -w /data williamyeh/wrk -c5 -t5 -d1m --latency -s /data/multipleuseragents.lua http://example.com
multiplepathsanduseragents: Found 9246 UA and 7269 paths
multiplepathsanduseragents: Found 9246 UA and 7269 paths
multiplepathsanduseragents: Found 9246 UA and 7269 paths
multiplepathsanduseragents: Found 9246 UA and 7269 paths
multiplepathsanduseragents: Found 9246 UA and 7269 paths
multiplepathsanduseragents: Found 9246 UA and 7269 paths
Running 1m test @ http://example.com
5 threads and 5 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 16.35ms 2.21ms 18.74ms 50.00%
Req/Sec 2.11 4.19 10.00 78.95%
Latency Distribution
50% 17.18ms
75% 18.74ms
90% 18.74ms
99% 18.74ms
19 requests in 1.00m, 0.92MB read
Socket errors: connect 0, read 5, write 0, timeout 15
Non-2xx or 3xx responses: 10
Requests/sec: 0.32
Transfer/sec: 15.73KB
The lua scripts expect the list file with the paths or the user-agents to be in /data. If you mount your host volume in a different folder, remember to change the lua script to read the file from the right place.
The credit for this script goes to https://github.com/timotta/wrk-scripts I just modified his script to work with user-agents