Mac上的Benchmark

Mac上有各指令模式的效能測試工具:ApacheBench(ab)
挺方便的喔

simonsuteki-MacBook-Pro:~ simonsu$ ab -n 10000 -c 50  http://localhost:3000/
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 localhost (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:        localhost
Server Port:            3000

Document Path:          /
Document Length:        277 bytes

Concurrency Level:      50
Time taken for tests:   20.230 seconds
Complete requests:      10000
Failed requests:        0
Write errors:           0
Total transferred:      3990000 bytes
HTML transferred:       2770000 bytes
Requests per second:    494.32 [#/sec] (mean)
Time per request:       101.150 [ms] (mean)
Time per request:       2.023 [ms] (mean, across all concurrent requests)
Transfer rate:          192.61 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.2      0       7
Processing:     2  101  57.3    101     230
Waiting:        2  101  57.3    101     230
Total:          3  101  57.3    101     230

Percentage of the requests served within a certain time (ms)
  50%    101
  66%    131
  75%    149
  80%    159
  90%    179
  95%    192
  98%    202
  99%    208
 100%    230 (longest request)
simonsuteki-MacBook-Pro:~ simonsu$ 

這個網誌中的熱門文章

Bash判斷參數是否存在

使用 minikube 輕鬆上手 kubernetes