Closed thinkjson closed 13 years ago
I ended up using ab to test. The shell script is below:
#!/bin/bash curl -X POST -d game_id=Bob -d latitude=27 -d longitude=-83 http://ctf.no.de/ga$ curl -X POST -d user_id=Bob -d latitude=27 -d longitude=-83 http://ctf.no.de:55$ curl -X POST -d game_id=Bob -d user_id=Bob -d latitude=27 -d longitude=-83 http$ echo "game_id=Bob&user_id=Bob&latitude=27&longitude=-83" > post_data ab -c 1000 -n 10000 -p post_data -T "application/x-www-form-urlencoded" ctf.no.d$ rm post_data
Here are the results:
This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking ctf.no.de (be patient) Completed 1000 requests Completed 2000 requests Completed 3000 requests Completed 4000 requests Completed 5000 requests Completed 6000 requests Completed 7000 requests Completed 8000 requests Completed 9000 requests Completed 10000 requests Finished 10000 requests Server Software: Server Hostname: ctf.no.de Server Port: 80 Document Path: /location Document Length: 24 bytes Concurrency Level: 1000 Time taken for tests: 3.763 seconds Complete requests: 10000 Failed requests: 0 Write errors: 0 Non-2xx responses: 10068 Total transferred: 1469928 bytes Total POSTed: 2098175 HTML transferred: 241632 bytes Requests per second: 2657.50 [#/sec] (mean) Time per request: 376.294 [ms] (mean) Time per request: 0.376 [ms] (mean, across all concurrent requests) Transfer rate: 381.48 [Kbytes/sec] received 544.52 kb/s sent 926.00 kb/s total Connection Times (ms) min mean[+/-sd] median max Connect: 42 191 584.1 71 3096 Processing: 44 106 52.6 96 1293 Waiting: 44 96 50.5 83 1266 Total: 88 297 588.4 176 3248 Percentage of the requests served within a certain time (ms) 50% 176 66% 187 75% 197 80% 208 90% 306 95% 356 98% 3169 99% 3189 100% 3248 (longest request)
Use cURL to create a new game and join it, then stress test the update_location REST endpoint.