Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ghz can't parse config #406

Open
dshemin opened this issue Mar 3, 2023 · 0 comments
Open

ghz can't parse config #406

dshemin opened this issue Mar 3, 2023 · 0 comments

Comments

@dshemin
Copy link

dshemin commented Mar 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant