echo '{"userIds": [10, 11, 12, 13, 14]}' > /tmp/queryUsersRequest.txt
The results of:
ab -p /tmp/queryUsersRequest.txt -T application/json -c 10 -n 10000 http://10.0.1.5:8080/api/rpc/UserService/queryUsers
are:
Document Path: /api/rpc/UserService/queryUsers
Document Length: 210 bytes
Concurrency Level: 10
Time taken for tests: 7.480 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 2870000 bytes
Total body sent: 1980000
HTML transferred: 2100000 bytes
Requests per second: 1336.97 [#/sec] (mean)
Time per request: 7.480 [ms] (mean)
Time per request: 0.748 [ms] (mean, across all concurrent requests)
Transfer rate: 374.72 [Kbytes/sec] received
258.52 kb/s sent
633.23 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.3 0 5
Processing: 1 7 6.3 4 170
Waiting: 1 7 6.2 4 170
Total: 2 7 6.3 4 171
Percentage of the requests served within a certain time (ms)
50% 4
66% 5
75% 8
80% 13
90% 15
95% 18
98% 26
99% 30
100% 171 (longest request)
The results of:
ab -p /tmp/queryUsersRequest.txt -T application/json -c 10 -n 10000 http://10.0.1.5:8080/rpc/api/UserService/queryUsers
are:
Document Path: /rpc/api/UserService/queryUsers
Document Length: 210 bytes
Concurrency Level: 10
Time taken for tests: 2.764 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 2870000 bytes
Total body sent: 1980000
HTML transferred: 2100000 bytes
Requests per second: 3617.67 [#/sec] (mean)
Time per request: 2.764 [ms] (mean)
Time per request: 0.276 [ms] (mean, across all concurrent requests)
Transfer rate: 1013.94 [Kbytes/sec] received
699.51 kb/s sent
1713.45 kb/s total
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 6
Processing: 1 2 2.6 2 18
Waiting: 1 2 2.6 2 18
Total: 1 3 2.7 2 19
Percentage of the requests served within a certain time (ms)
50% 2
66% 2
75% 2
80% 2
90% 3
95% 12
98% 13
99% 13
100% 19 (longest request)
With connection reuse: