example

command
v0.0.0-...-a56b909 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2015 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Example is a HTTP server that respondes to requests on /limited according to the provided token bucket policy.

$ go run example.go -limit=60 &
$ ab -n5000 -c5 http://localhost:6060/limited

This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
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 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
Completed 2500 requests
Completed 3000 requests
Completed 3500 requests
Completed 4000 requests
Completed 4500 requests
Completed 5000 requests
Finished 5000 requests

Server Software:
Server Hostname:        localhost
Server Port:            6060

Document Path:          /limited
Document Length:        0 bytes

Concurrency Level:      5
Time taken for tests:   82.328 seconds
Complete requests:      5000
Failed requests:        0
Total transferred:      580000 bytes
HTML transferred:       0 bytes
Requests per second:    60.73 [#/sec] (mean)
Time per request:       82.328 [ms] (mean)
Time per request:       16.466 [ms] (mean, across all concurrent requests)
Transfer rate:          6.88 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:     0   82  73.4     66     900
Waiting:        0   82  73.4     66     900
Total:          0   82  73.4     66     900

Percentage of the requests served within a certain time (ms)
  50%     66
  66%     83
  75%    116
  80%    133
  90%    183
  95%    233
  98%    300
  99%    350
 100%    900 (longest request)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL