tsenart / vegeta

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

-lazy option does NOT seem to work #218

Closed noname5551010 closed 7 years ago

noname5551010 commented 7 years ago

Hi Tomas,

I tried to use the -lazy option but vegeta quits very quickly. It does not hold up sessions. Would you please help?

Thanks -Peter

If I do NOT use -lazy, it runs infinitely until crt-c is pressed:- ./vegeta attack -targets=targets.txt -duration=0 -rate=1 -redirects=5 | ./vegeta report ^CRequests [total, rate] 9, 1.13 Duration [total, attack, wait] 8.002245768s, 7.999999599s, 2.246169ms Latencies [mean, 50, 95, 99, max] 2.324771ms, 1.910596ms, 2.764306ms, 2.764306ms, 3.519398ms Bytes In [total, mean] 405, 45.00 Bytes Out [total, mean] 0, 0.00 Success [ratio] 100.00% Status Codes [code:count] 200:9
Error Set:

If -lazy is used, it quits in 3 seconds:- ./vegeta attack -targets=targets.txt -duration=0 -rate=1 -redirects=5 -lazy | ./vegeta report Requests [total, rate] 5, 1.25 Duration [total, attack, wait] 4.001309196s, 3.999999666s, 1.30953ms Latencies [mean, 50, 95, 99, max] 1.004896ms, 460.557µs, 1.30953ms, 1.30953ms, 2.012768ms Bytes In [total, mean] 45, 9.00 Bytes Out [total, mean] 0, 0.00 Success [ratio] 20.00% Status Codes [code:count] 200:1 0:4
Error Set: no targets to attack

./vegeta -version v6.1.1

noname5551010 commented 7 years ago

This is the targets.txt that is used:-

cat targets.txt GET http://172.16.205.1 Host: 172.16.205.1 User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36 Accept-Encoding: gzip, deflate Accept: / Accept-Language: en-US;q=0.6,en;q=0.4 Connection: keep-alive Content-Type: application/x-www-form-urlencoded

tsenart commented 7 years ago

With the -lazy flag you need to continuously provide new targets as input. It's meant to be used with infinite streams of targets coming in. If you have a single one, don't use it.

noname5551010 commented 7 years ago

Hi Tomas,

Would you please provide me example? I don't get how to provide continuous targets as input? Do you mean I have to make thousands of HTTTP GET lines in the file? What about infinite streams of targets? do you mean I have to GET a big file, say 10Mb, from HTTP server? Thanks

tsenart commented 7 years ago

I mean it's meant to be used with another "generator" program that continuously produces new targets to be consumed by vegeta.

Sent from my iPhone

On 14 Feb 2017, at 08:18, pngai1 notifications@github.com wrote:

Hi Tomas,

Would you please provide me example? I don't get how to provide continuous targets as input? Do you mean I have to make thousands of HTTTP GET lines in the file? What about infinite streams of targets? do you mean I have to GET a big file, say 10Mb, from HTTP server? Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.