Skip to content

Instantly share code, notes, and snippets.

@flyingmutant
Created March 30, 2016 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyingmutant/d80c81115b6b506149b5fd6e5f4befe8 to your computer and use it in GitHub Desktop.
Save flyingmutant/d80c81115b6b506149b5fd6e5f4befe8 to your computer and use it in GitHub Desktop.
package main
import (
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte("hello\n"))
})
http.ListenAndServe(":8080", nil)
}
@flyingmutant
Copy link
Author

24 cores, using https://github.com/rakyll/boom:

gregorys@fullstats gohttpbench]$ ./boom-linux -n 100000 -c 1000 -cpus 24 'http://localhost:8080'
Summary:
  Total:    1.1272 secs
  Slowest:  1.0488 secs
  Fastest:  0.0001 secs
  Average:  0.0101 secs
  Requests/sec: 88715.6108
  Total data:   600000 bytes
  Size/request: 6 bytes

Status code distribution:
  [200] 100000 responses

Response time histogram:
  0.000 [1] |
  0.105 [99921] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  0.210 [16]    |
  0.315 [0] |
  0.420 [0] |
  0.524 [0] |
  0.629 [0] |
  0.734 [0] |
  0.839 [0] |
  0.944 [0] |
  1.049 [62]    |

Latency distribution:
  10% in 0.0028 secs
  25% in 0.0045 secs
  50% in 0.0060 secs
  75% in 0.0096 secs
  90% in 0.0222 secs
  95% in 0.0262 secs
  99% in 0.0606 secs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment