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

not honoring -z option flag for duration #14

Closed
justinlarose opened this issue May 25, 2018 · 5 comments
Closed

not honoring -z option flag for duration #14

justinlarose opened this issue May 25, 2018 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@justinlarose
Copy link

justinlarose commented May 25, 2018

OS: Mac OS
grpcannon version: 0.4.1

When running grpcannon using the -z option flag, grpcannon is still defaulting to running 200 requests instead of honoring the time duration value.

example:

grpcannon -z 1m -cert cert.pem --proto employeedirectory.proto -call directory.position.GetEmployee -d '{"name":"Steve", "position":"doctor"}' -M metadata.json jobs.search.com:8080
@bojand
Copy link
Owner

bojand commented May 25, 2018

Are the 200 requests done before 60 seconds (1m) are up? I have a hard time believing that 200 requests at the default concurrency of 50 would take longer than 1 minute but I do not know the specifics of your service. Also the data in -d parameter doesn't seem to be properly formatted JSON?

I just downloaded the 0.4.1 and tried it and it seems to be working fine:

~/Downloads/grpcannon_0.4.1_darwin_amd64 ./grpcannon -z 1m -proto $GOPATH/src/github.com/bojand/grpcannon/testdata/greeter.proto -call helloworld.Greeter.SayHello -d '{"name":"Bob"}' -n 1000000 -c 1 0.0.0.0:50051
Stopped due to test timeout after 1m0s

Summary:
  Count:	365866
  Total:	60002.42 ms
  Slowest:	10.02 ms
  Fastest:	0.10 ms
  Average:	0.15 ms
  Requests/sec:	6097.52

Response time histogram:
  0.098 [1]	|
  1.091 [365741]	|∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
  2.083 [87]	|
  3.076 [20]	|
  4.069 [12]	|
  5.061 [2]	|
  6.054 [2]	|
  7.046 [0]	|
  8.039 [0]	|
  9.032 [0]	|
  10.024 [1]	|

Latency distribution:
  10% in 0.13 ms
  25% in 0.13 ms
  50% in 0.14 ms
  75% in 0.15 ms
  90% in 0.19 ms
  95% in 0.21 ms
  99% in 0.32 ms
Status code distribution:
  [OK]	365866 responses


~/Downloads/grpcannon_0.4.1_darwin_amd64 ./grpcannon -v
0.4.1
~/Downloads/grpcannon_0.4.1_darwin_amd64

You can see

Stopped due to test timeout after 1m0s

and the fact that the total time is 60002 ms (1 minute) and the count is only 365866.

@justinlarose
Copy link
Author

My JSON is not properly formatted. I'll update it.

Thank you for the clarification. I think I was confused by the flag description. It states If duration is specified, n is ignored.. I understood this to mean that the test would run for the duration specified and a value for -n did not need to be supplied. But it appears that -n is not ignored and should be set to a value where the test completion duration should exceed duration set by -z.

@bojand
Copy link
Owner

bojand commented May 25, 2018

Oh I see... Hmm yes that may be a bug either in the description of z or handing of z and n like you state. Thanks for pointing that out. I will take a look and figure out what's the best thing.

@bojand bojand self-assigned this May 25, 2018
@bojand bojand added the bug Something isn't working label May 25, 2018
@bojand bojand closed this as completed in #15 Jun 4, 2018
@bojand
Copy link
Owner

bojand commented Jun 5, 2018

Hello,

I have changed the -z option to behave as the help documentation specified. Additionally now we have -x option which is the behaviour of what -z used to be as demonstrated above. Released as 0.5.0.

@justinlarose
Copy link
Author

thanks for fixing this so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants