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

Feature Request: Number of requests option #21

Open
smw1218 opened this issue Nov 6, 2019 · 3 comments
Open

Feature Request: Number of requests option #21

smw1218 opened this issue Nov 6, 2019 · 3 comments

Comments

@smw1218
Copy link

smw1218 commented Nov 6, 2019

For my purposes, I would like to use the old ab -n option to set a specific number of requests rather than duration. It would be mutually exclusive of -d.

@gbrail
Copy link
Contributor

gbrail commented Nov 18, 2019

Interesting -- long ago when I started this project I was trying to get away from that, but that doesn't mean it isn't useful.

Can you explain your use case?

And how important is it that the count be exact, versus approximate (obviously the final statistics will be based on actual data.)

I'm asking because apib is multi-threaded so if we want to ensure that all threads stop after the exact same number of requests then we have to handle things differently then if the number of requests is more of a suggestion.

@smw1218
Copy link
Author

smw1218 commented Nov 18, 2019

The exact counts aren't too important. I'm looking for a reasonably valid number of requests for the statistics so there's probably other ways to skin that cat. I'm automating a large number of apib runs across many or my API's URLs. I've hard-coded -d 5, but some requests are slow and I end up with too few requests to trust the stats.

My actual goal is to perform the minimum number of requests to get reasonable repeatability on the test. There's probably some sophisticated statistical method to do it, but it would likely be even harder to coordinate in a multi-threaded environment. Having the -n would just be another tool to help on this.

@gbrail
Copy link
Contributor

gbrail commented Nov 18, 2019 via email

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

2 participants