ghz
ghz copied to clipboard
Ability to randomize requests made by ghz
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.
+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?
What is way to make request with random data picked up from the input file?
What is way to make request with random data picked up from the input file?
Excuse me, have you resolved it?