ghz icon indicating copy to clipboard operation
ghz copied to clipboard

ghz can't parse config

Open dshemin opened this issue 1 year ago • 0 comments

Command line arguments / config Configuration file from https://ghz.sh/docs/example_config

{
    "proto": "/path/to/greeter.proto",
    "call": "helloworld.Greeter.SayHello",
    "total": 2000,
    "concurrency": 50,
    "data": {
        "name": "Joe"
    },
    "metadata": {
        "foo": "bar",
        "trace_id": "{{.RequestNumber}}",
        "timestamp": "{{.TimestampUnix}}"
    },
    "import-paths": [
        "/path/to/protos"
    ],
    "max-duration": "10s",
    "host": "0.0.0.0:50051"
}

Describe the bug I constantly got an error when try to call command with configuration file:

ghz: error: strconv.ParseUint: parsing "config.json": invalid syntax, try --help

To Reproduce

  1. go install github.com/bojand/ghz/cmd/ghz@latest
  2. Put configuration from example to config.json. (Also work for .yaml and .toml files)
  3. Run ghz -config config.json

Expected behavior Should run correctly

Environment

  • OS: Ubuntu 20.04.5
  • ghz: 0.114.0, 0.113.0, latest

Additional context I've tried different combination of options in config file. All of them didn't works at all.

dshemin avatar Mar 03 '23 07:03 dshemin