Skip to content

How to Benchmark hello.rs Example

Jonathan Reem edited this page Feb 22, 2016 · 11 revisions

Using wrk HTTP Benchmarking Tool

Assuming you are listening on localhost at port 3000, hello.rs can be benchmarked like following:

(Details of configuration parameters can be found in wrk README)

$ wrk --latency -t12 -c100 -d10s http://localhost:3000/    

After 10 seconds, results will be presented to standard output

wrk --latency -t12 -c100 -d10s http://localhost:3000/
Running 10s test @ http://localhost:3000/
  12 threads and 100 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     1.20ms    5.70ms 151.37ms   99.58%
    Req/Sec     6.08k     3.36k   13.70k    59.42%
  Latency Distribution
     50%    0.85ms
     75%    0.95ms
     90%    1.00ms
     99%    1.16ms
  732018 requests in 10.10s, 79.58MB read
Requests/sec:  72479.41
Transfer/sec:      7.88MB

Now you can bask in the glory of 72.4K reqs/s

Benchmark setup

Above benchmark was performed on the following hardware:

  Model Name: MacBook Pro
  Processor: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
  Memory (RAM): 16 GB
  Total Number of Cores: 4
  Total Number of Threads: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 6 MB
  Model Name: MacBook Pro
Clone this wiki locally