Output

Summary

Sample standard output of summary of the results:

  1. Summary:
  2. Count: 200
  3. Total: 181.57 ms
  4. Slowest: 69.60 ms
  5. Fastest: 26.09 ms
  6. Average: 32.01 ms
  7. Requests/sec: 1101.53
  8. Response time histogram:
  9. 26.093 [1] |∎
  10. 30.444 [52] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  11. 34.794 [78] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  12. 39.145 [40] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  13. 43.495 [1] |∎
  14. 47.846 [0] |
  15. 52.196 [2] |∎
  16. 56.547 [5] |∎∎∎
  17. 60.897 [3] |∎∎
  18. 65.248 [2] |∎
  19. 69.598 [2] |∎
  20. Latency distribution:
  21. 10% in 28.48 ms
  22. 25% in 30.08 ms
  23. 50% in 33.23 ms
  24. 75% in 35.43 ms
  25. 90% in 38.89 ms
  26. 95% in 55.45 ms
  27. 99% in 69.60 ms
  28. Status code distribution:
  29. [Unavailable] 3 responses
  30. [PermissionDenied] 3 responses
  31. [OK] 186 responses
  32. [Internal] 8 responses
  33. Error distribution:
  34. [8] rpc error: code = Internal desc = Internal error.
  35. [3] rpc error: code = PermissionDenied desc = Permission denied.
  36. [3] rpc error: code = Unavailable desc = Service unavialable.

Explanation of the summary:

  • count - The total number of completed requests including successful and failed requests.
  • total - The total time spent running the test within ghz from start to finish. This is a single measurement from start of the test run to the completion of the final request of the test run.
  • slowest - The measurement of the slowest request.
  • fastest - The measurement of the fastest request.
  • average - The mathematical average computed by taking the sum of the individual response times of all requests and dividing it by the total number of requests.
  • requests/sec - Theoretical computed RPS computed by taking the total number of requests (successful and failed) and dividing it by the total duration of the test. That is: count / total.

With regard to measurement, we use WithStatsHandler option to capture call metrics. Specifically we only capture the End event which contains stats when an RPC ends. This should include the download of the payload and deserializing of the data.

CSV

Alternatively with -O csv flag we can get detailed listing in csv format:

  1. duration (ms),status,error
  2. 1.43,OK,
  3. 0.39,OK,
  4. 0.36,OK,
  5. 0.50,OK,
  6. 0.36,OK,
  7. 0.40,OK,
  8. 0.37,OK,
  9. 0.34,OK,
  10. 0.35,OK,
  11. 0.32,OK,
  12. ...

HTML

HTML output can be generated using html as format in the -O option. Sample HTML output.

JSON

Using -O json outputs JSON data, and -O pretty outputs JSON in pretty format. Sample pretty JSON output.

Prometheus

Using -O prometheus outputs the summary data as Prometheus text exposition format . Sample Prometheus output.

InfluxDB Line Protocol

Using -O influx-summary outputs the summary data as InfluxDB Line Protocol. Sample output:

  1. ghz_run,name="Greeter\ SayHello",proto="./greeter.proto",call="helloworld.Greeter.SayHello",host="0.0.0.0:50051",n=200,c=50,rps=0,z=0,timeout=20,dial_timeout=10,keepalive=0,data="{\"name\":\"Bob\ Smith\"}",metadata="",tags="{\"created\ by\":\"Joe\ Developer\"\,\"env\":\"staging\"}",errors=0,has_errors=false count=200,total=214737065,average=37806598,fastest=25759157,slowest=77504712,rps=931.37,median=36947515,p95=47421426,errors=0 1548107303068421000

Use -O influx-details to get the individual details for each request:

  1. ghz_detail,name="Greeter\ SayHello",proto="./greeter.proto",call="helloworld.Greeter.SayHello",host="0.0.0.0:50051",n=200,c=50,rps=0,z=0,timeout=20,dial_timeout=10,keepalive=0,data="{\"name\":\"Bob\ Smith\"}",metadata="",tags="{\"created\ by\":\"Joe\ Developer\"\,\"env\":\"staging\"}",hasError=false latency=79044469,error="",status="OK" 1548107176979991000
  2. ghz_detail,name="Greeter\ SayHello",proto="./greeter.proto",call="helloworld.Greeter.SayHello",host="0.0.0.0:50051",n=200,c=50,rps=0,z=0,timeout=20,dial_timeout=10,keepalive=0,data="{\"name\":\"Bob\ Smith\"}",metadata="",tags="{\"created\ by\":\"Joe\ Developer\"\,\"env\":\"staging\"}",hasError=false latency=43011582,error="",status="OK" 1548107177023123000