LoginSignup
1
1

More than 5 years have passed since last update.

MacOSX Lion に最初から入ってるab(apache bench)が腐ってる件

Posted at

最初から入ってる奴を使うと

$ which ab
/usr/sbin/ab
$ ab -n 1000 http://localhost:9999/
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)
apr_socket_recv: Connection reset by peer (54)
Total of 2 requests completed

なんだこりゃ、となるので

$ sudo port install apache2
$ /opt/local/apache2/bin/ab -n 1000 http://localhost:9999/
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 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests


Server Software:        SimpleHTTP/0.6
Server Hostname:        localhost
Server Port:            9999

Document Path:          /
Document Length:        105 bytes

Concurrency Level:      1
Time taken for tests:   0.784 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      290000 bytes
HTML transferred:       105000 bytes
Requests per second:    1274.70 [#/sec] (mean)
Time per request:       0.784 [ms] (mean)
Time per request:       0.784 [ms] (mean, across all concurrent requests)
Transfer rate:          361.00 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     1    1   2.0      1      51
Waiting:        0    1   1.6      0      35
Total:          1    1   2.0      1      51

Percentage of the requests served within a certain time (ms)
  50%      1
  66%      1
  75%      1
  80%      1
  90%      1
  95%      1
  98%      1
  99%      4
 100%     51 (longest request)

めでたしめでたし

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1