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

Using config as default and CLI flag as overrides #136

Closed
minddazed opened this issue Oct 29, 2019 · 1 comment
Closed

Using config as default and CLI flag as overrides #136

minddazed opened this issue Oct 29, 2019 · 1 comment
Assignees
Labels
CLI Issues for ghz CLI enhancement New feature or request

Comments

@minddazed
Copy link

minddazed commented Oct 29, 2019

Is your feature request related to a problem? Please describe.
I'd like to use the CLI flags to override default parameters set in a config file.

Describe the solution you'd like
For example duration is something I often change between tests. I would like to specify a default value in the config file, e.g. in data.json "duration=10m", but then override this value if I pass it in as a flag on the command, e.g. "ghz --config=data.json -z 1m"

This is particularly useful when I want to change the duration of a test script where I batch ghz load tests to simulate multiple GRPC method calls to a single service.

#!/usr/bin/env bash
DURATION="1m"

ghz --config=getByName.json -z $DURATION > report1.html &
ghz --config=getById.json -z $DURATION > report2.html &
ghz --config=sendName.json -z $DURATION > report3.html

Additional context
I've tried this against the current ghz build and it does not seem to be supported.

@bojand bojand self-assigned this Oct 30, 2019
@bojand bojand added CLI Issues for ghz CLI enhancement New feature or request labels Oct 30, 2019
@bojand bojand closed this as completed in b3fb967 Nov 29, 2019
@bojand
Copy link
Owner

bojand commented Nov 29, 2019

Hello this should be implemented now in 0.46.0. Feel free to create new issue if there are any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Issues for ghz CLI enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants