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

Ability to randomize requests made by ghz #197

Open
aculver28 opened this issue Jun 16, 2020 · 3 comments
Open

Ability to randomize requests made by ghz #197

aculver28 opened this issue Jun 16, 2020 · 3 comments
Labels
CLI Issues for ghz CLI enhancement New feature or request

Comments

@aculver28
Copy link

Describe the solution you'd like
I have a service that takes in an array/repeated string field and I'd like to use ghz to simulate concurrent requests of varying sizes. For example, a request could look like this:

{
    "request_id":"abc",
    "request_type":"some type",
    "parameters":["val1", "val2"]
}

but it could also look like this:

{
    "request_id":"def",
    "request_type":"some type",
    "parameters":["val1", "val2","val3", "val4",...,"val5000"]
}

If at all possible, I'd like to be able to use the --data-file flag and have a JSON array (or newline delimited) of different requests and have ghz pick one at random for each request it makes. Ideally, an option to provide a custom metric to the report would be awesome, but I can see how that would get complicated and I could absolutely live without that in this otherwise amazing tool. 😄

Describe alternatives you've considered
I've considered a script that picks a random request from a list of requests and executes a ghz test based on that, but the ultimate goal would be to see all the data in a single report.

@JacobCrofts
Copy link

+1

Who's to say my application or database is not caching data in some way, such that subsequent calls to an rpc with identical parameters yield results more quickly than they would for the traffic we are trying to simulate?

@shubham07507
Copy link

What is way to make request with random data picked up from the input file?

@appleezhang
Copy link

What is way to make request with random data picked up from the input file?

Excuse me, have you resolved it?

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

5 participants