JoeDog / siege

Siege is an http load tester and benchmarking utility
GNU General Public License v3.0
5.91k stars 386 forks source link

Posting JSON via file only uses first entry ignoring other urls in the file #154

Open sab84 opened 5 years ago

sab84 commented 5 years ago

Hi,

I might be doing something terribly stupid, but I can't seem to get siege to use multiple urls (or different POST data to same URL) when providing it as a file:

[ec2-user@some_machine ~]$ wc -l e.txt 3 e.txt [ec2-user@some_machine ~]$ cat e.txt https://mysvc POST {"params":"blah123"} https://mysvc POST {"params":"blah456"} https://mysvc POST {"params":"blah789"} [ec2-user@some_machine ~]$ siege -c1 -r1 -f e.txt SIEGE 4.0.4 Preparing 1 concurrent users for battle. The server is now under siege... HTTP/1.1 200 0.14 secs: 3286 bytes ==> POST https://mysvc

Transactions: 1 hits Availability: 100.00 % Elapsed time: 0.15 secs Data transferred: 0.00 MB Response time: 0.14 secs Transaction rate: 6.67 trans/sec Throughput: 0.02 MB/sec Concurrency: 0.93 Successful transactions: 1 Failed transactions: 0 Longest transaction: 0.14 Shortest transaction: 0.14

[ec2-user@some_machine ~]$

Why is only the first entry being used? Is this a bug or have I gotten it wrong?

Thanks

sab84 commented 5 years ago

I appear to be doing the right thing going by what is described on these sites: https://kalamuna.atlassian.net/wiki/spaces/KALA/pages/16023587/Testing+With+Apache+Benchmark+and+Siege

https://blog.jayway.com/2015/10/21/simple-load-testing-using-siege/

http://blog.remarkablelabs.com/2012/11/benchmarking-and-load-testing-with-siege

I also went through siege manual which describes a url file with multiple URLs.

This suggests there is some bug in siege?

dakdad commented 3 years ago

Hey @sab84 I know this is probably long overdue.

I think it is because you are using -c1 -r1 which is one concurrent user with one repetition. If you make this -r2 it will work.