Skip to content

Perftest - HTTP Performance Testing Utility

This is a wrapper around hey.

Usage

Usage: perftest [options] url

Options:
  -c int
        concurrency (default 1)
  -csvdiff string
        output a comparison of two csvout runs csvout0,csvout1 to stdout
  -csvout string
        file to write CSV results
  -ct string
        content type: 'none', 'form' or 'json' (default "none")
  -headers int
        number of extra headers (default 10)
  -http2
        enable HTTP/2 support
  -method string
        HTTP method to use (default "GET")
  -n int
        number of requests (default 1)
  -rate float
        request rate (rps)
  -size string
        content size: 'none', small', 'med', or 'large' (default "none")
  -tlimit duration
        time limit for the test: 0=unlimited

Example

$ perftest -c 2 -method POST -ct json -size small -n 10 -csvout /dev/stdout 'http://localhost:8085/debug?delay=250us:30,5ms:5&status=503:0.5,429:1.5'
Test Summary:
  Target URL:      http://localhost:8085/debug?delay=250us:30,5ms:5&status=503:0.5,429:1.5
  HTTP Method:     POST
  Content Type:    application/json
  Content Length:  561
  Concurrency:     2
  Requests:        10

Raw HTTP Request:
------------------------------------------------------------
POST /debug?delay=250us:30,5ms:5&status=503:0.5,429:1.5 HTTP/1.1
Host: localhost:8085
User-Agent: sigsci-perftest/0.0.2
Content-Length: 561
Content-Type: application/json
Sigsci-Header-01: Sigsci-Val-1
Sigsci-Header-02: Sigsci-Val-2
Sigsci-Header-03: Sigsci-Val-3
Sigsci-Header-04: Sigsci-Val-4
Sigsci-Header-05: Sigsci-Val-5
Sigsci-Header-06: Sigsci-Val-6
Sigsci-Header-07: Sigsci-Val-7
Sigsci-Header-08: Sigsci-Val-8
Sigsci-Header-09: Sigsci-Val-9
Sigsci-Header-10: Sigsci-Val-10
Accept-Encoding: gzip

{"_id":"56627c3e95fd40bfe5710335","address":"228 Ovington Avenue, Sexton, Tennessee, 1562","age":36,"balance":"$1,358.84","company":"INSECTUS","email":"rosiemccullough@insectus.com","eyeColor":"green","favoriteFruit":"apple","gender":"female","greeting":"Hello, Rosie Mccullough! You have 10 unread messages.","guid":"120b94d0-a3be-4acf-8540-7821416bd9b1","index":0,"isActive":false,"latitude":47.151313,"longitude":-16.348278,"name":"Rosie Mccullough","phone":"+1 (957) 502-3458","picture":"http://placehold.it/32x32","registered":"2014-10-18T10:35:09 +07:00"}
------------------------------------------------------------

Waiting for target "localhost:8085" to become ready...
Ready after 1.488765ms
Starting load test...

Summary:
  Total:    0.0210 secs
  Slowest:  0.0074 secs
  Fastest:  0.0029 secs
  Average:  0.0042 secs
  Requests/sec: 475.2758

  Total data:   13630 bytes
  Size/request: 1363 bytes

Response time histogram:
  0.003 [1] |■■■■■■■■■■
  0.003 [4] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
  0.004 [2] |■■■■■■■■■■■■■■■■■■■■
  0.004 [1] |■■■■■■■■■■
  0.005 [0] |
  0.005 [0] |
  0.006 [0] |
  0.006 [0] |
  0.007 [0] |
  0.007 [0] |
  0.007 [2] |■■■■■■■■■■■■■■■■■■■■


Latency distribution:
  10% in 0.0029 secs
  25% in 0.0033 secs
  50% in 0.0034 secs
  75% in 0.0073 secs
  90% in 0.0074 secs
  0% in 0.0000 secs
  0% in 0.0000 secs

Details (average, fastest, slowest):
  DNS+dialup:   0.0003 secs, 0.0029 secs, 0.0074 secs
  DNS-lookup:   0.0002 secs, 0.0000 secs, 0.0009 secs
  req write:    0.0000 secs, 0.0000 secs, 0.0002 secs
  resp wait:    0.0038 secs, 0.0028 secs, 0.0057 secs
  resp read:    0.0001 secs, 0.0000 secs, 0.0001 secs

Status code distribution:
  [200] 10 responses



Load test completed after 21.857332ms
timestamp,host,concurrency,count,method,content-type,size,reqsize (b),success,failed,test_time (s),tx_time_50 (ms),tx_time_95 (ms),rps,rps_success
2020-06-03 17:34:53 -0400,localhost,2,10,POST,json,small,1084,10,0,0.021040,3.435814,0.000000,475.275751,475.275751