ikruglov / slapper

Simple load testing tool with real-time updated histogram of request timings
MIT License
335 stars 33 forks source link

Added ability to write response stats to a CSV file. #10

Closed grzkv closed 4 years ago

grzkv commented 5 years ago

This adds the -out filename flag to the slapper command. The response stats will be written to a CSV file if it is provided.

The file will have the format response code, response time in ms. E.g.

200, 5
200, 10
...
404, 5

This file can be post-processed to get response time histograms per code, percentiles, etc.

I have tested the performance of writing to a file. Writing to a file does not impede performance even at 25000 QPS agains a local lighweight server. The QPS remains approximately the same with and without -out option.

grzkv commented 5 years ago

@ikruglov Would you please have a look at these changes? We use them for some time and it seems to work well. Thanks in advance!

ikruglov commented 5 years ago

@grzkv, sorry for long reply. I'm wondering if we can keep CLI compatible https://github.com/tsenart/vegeta. At some point, I started mimicking its logic. Would be nice to keep it things like this.

grzkv commented 5 years ago

@ikruglov I can rename -out to -output. This will make it closer to vegeta.

vegeta and slapper operate differently and it's hard to make complete 1-to-1 similarity.

Would you suggest something else on top?