Configuration Files

All the call options can be specified in JSON or TOML config files and used as input via the -config option.

An example JSON config file:

  1. {
  2. "proto": "/path/to/greeter.proto",
  3. "call": "helloworld.Greeter.SayHello",
  4. "total": 2000,
  5. "concurrency": 50,
  6. "data": {
  7. "name": "Joe"
  8. },
  9. "metadata": {
  10. "foo": "bar",
  11. "trace_id": "{{.RequestNumber}}",
  12. "timestamp": "{{.TimestampUnix}}"
  13. },
  14. "import-paths": [
  15. "/path/to/protos"
  16. ],
  17. "max-duration": "10s",
  18. "host": "0.0.0.0:50051"
  19. }

An example TOML config file:

  1. "max-duration" = "7s"
  2. total = 5000
  3. concurrency = 50
  4. proto = "../../testdata/greeter.proto"
  5. call = "helloworld.Greeter.SayHello"
  6. host = "0.0.0.0:50051"
  7. insecure = true
  8. output = "pretty.json"
  9. format = "pretty"
  10. [data]
  11. name = "Bob {{.TimestampUnix}}"
  12. [metadata]
  13. rn = "{{.RequestNumber}}"