tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.06k stars 1.34k forks source link

infinity / rate 0 not working? #619

Open unusualevent opened 1 year ago

unusualevent commented 1 year ago

Version and Runtime

as of 27f553fe091151234f899866bc8ee0072be0c9b5 (latest go install github.com/tsenart/vegeta@latest)

Expected Behaviour

per docs, something about --rate=infinity or --rate=0

Actual Behaviour

something about it being undefined

invalid value "infinity" for flag -rate: strconv.Atoi: parsing "infinity": invalid syntax
2023/05/15 21:12:59 rate frequency and time unit must be bigger than zero

Steps to Reproduce

echo "GET https://example.com" | vegeta attack -duration=5s -connections=100 -rate=0/0s | tee results.bin | vegeta report

Additional Context

https://github.com/tsenart/vegeta/pull/423 <- feature introuced here?

tsenart commented 1 year ago

That’s a misinterpretation of the docs. For infinity, pass 0.On 16. May 2023, at 05:14, unusualevent @.> wrote: Version and Runtime as of 27f553fe091151234f899866bc8ee0072be0c9b5 (latest go install @.)

Expected Behaviour per docs, something about --rate=infinity or --rate=0 Actual Behaviour something about it being undefined invalid value "infinity" for flag -rate: strconv.Atoi: parsing "infinity": invalid syntax 2023/05/15 21:12:59 rate frequency and time unit must be bigger than zero

Steps to Reproduce

echo "GET https://example.com" | vegeta attack -duration=5s -connections=100 -rate=0/0s | tee results.bin | vegeta report Additional Context

423 <- feature introuced here?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

unusualevent commented 1 year ago

So then this line is dead code I'm guessing: https://github.com/tsenart/vegeta/blob/27f553fe091151234f899866bc8ee0072be0c9b5/flags.go#LL68C1-L68C1

And there's two spots to change in the docs, the markdown and the help output.

0.0n or "0.On" seems reeeeaaally specific

unusualevent commented 1 year ago

what you suggested doesn't work. echo "GET https://example.com" | vegeta attack -duration=5s -rate=0.0n (or 0.0s, or 0.Os, or 0.0, etc etc

tsenart commented 1 year ago

Sorry that was a typo on mobile. Yeah seems like a regression. infinity or 0 should work, but don't.