Releases: tsenart/vegeta
Only use status text as error message
This release fixes a bug introduced in the previous release which included full response bodies as error messages.
#108
Treat [200...399] status code range as errors
This release fixes a bug that didn't treat responses with status codes outside the [200...399] range as errors. Thanks to @davideicardi for reporting it.
Dump command
This release implements a dump
command which outputs piped attack results in different formats.
$ vegeta dump -h
Usage of vegeta dump:
-dumper="": Dumper [json, csv]
-inputs="stdin": Input files (comma separated)
-output="stdout": Output file
-inputs
Specifies the input files containing attack results to be dumped. You can specify more than one (comma separated).
-output
Specifies the output file to which the dump will be written to.
-dumper
Specifies the dump format.
json
Dumps attack results as JSON objects.
csv
Dumps attack results as CSV records with six columns.
The columns are: unix timestamp in ns since epoch, http status code,
request latency in ns, bytes out, bytes in, and lastly the error.
Histogram reporter
This release adds the hist[buckets]
reporter to the report
command which computes and prints a text based latency histogram for the given buckets. Here's an example of using it.
$ cat results.bin | vegeta report -reporter='hist[0,2ms,4ms,6ms]'
Bucket # % Histogram
[0, 2ms] 6007 32.65% ########################
[2ms, 4ms] 5505 29.92% ######################
[4ms, 6ms] 2117 11.51% ########
[6ms, +Inf] 4771 25.93% ###################
Thanks to @bgentry for stirring up the discussion on this feature!
Extended targets language
This release extends the targets language to support custom per-target headers and bodies in a fully backwards compatible way.
Simple targets
GET http://goku:9090/path/to/dragon?item=balls
GET http://user:password@goku:9090/path/to
HEAD http://goku:9090/path/to/success
Targets with custom headers
GET http://user:password@goku:9090/path/to
X-Account-ID: 8675309
DELETE http://goku:9090/path/to/remove
Confirmation-Token: 90215
Authorization: Token DEADBEEF
Targets with custom bodies
POST http://goku:9090/things
@/path/to/newthing.json
PATCH http://goku:9090/thing/71988591
@/path/to/thing-71988591.json
Targets with custom bodies and headers
POST http://goku:9090/things
X-Account-ID: 99
@/path/to/newthing.json
Shout out to @cwinters for sparking up this discussion and contributing to the implementation.
Keepalive option
This release adds a -keepalive
option to the attack
command which allows disabling HTTP keepalives.
Apart from that, we're now treating 3xx
response codes as successes instead of errors.
Credit to @jpfuentes2 for the keepalive change set.
Fix missing report output bug and add FreeBSD and Windows releases
This release fixes a bug which made report
occasionally exit without producing any output.
This bug was reported here.
Besides this bug fix, I'm including FreeBSD and Windows binaries for the first time.
Workers option and graceful shutdown
Add Wait field to Metrics and include it in ReportText
This release is a full backwards compatible release. It just extends the Metrics
struct with the Wait
field which represents the time waiting for all responses to come back. This information is included in the output of ReportText
too. Example (see change in Duration
):
Requests [total] 1200
Duration [total, attack, wait] 10.094965987s, 9.949883921s, 145.082066ms
Latencies [mean, 50, 95, 99, max] 113.172398ms, 108.272568ms, 140.18235ms, 247.771566ms, 264.815246ms
Bytes In [total, mean] 3714690, 3095.57
Bytes Out [total, mean] 0, 0.00
Success [ratio] 55.42%
Status Codes [code:count] 0:535 200:665
Error Set:
Get http://localhost:6060: dial tcp 127.0.0.1:6060: connection refused
Get http://localhost:6060: read tcp 127.0.0.1:6060: connection reset by peer
Get http://localhost:6060: dial tcp 127.0.0.1:6060: connection reset by peer
Get http://localhost:6060: write tcp 127.0.0.1:6060: broken pipe
Get http://localhost:6060: net/http: transport closed before response was received
Get http://localhost:6060: http: can't write HTTP request on broken connection
Lazy mode and streaming optimisations
This release includes a number of optimisations, deprecations, and API changes:
-lazy
flag added to theattack
command. This enables reading infinite streams of input targets.- Hit results are now streamed out of
attack
as soon as they arrive. Before, all hits would have to finish before sending the results out. - The
report
command can now read its inputs concurrently and is responsible for aggregating and sorting them. - Removed
order
attack option as well as the associated library code. Randomizing the order of targets can be easily achieved outside of Vegeta. - Removed the attached Encode, Decode and Sort methods of the Results type. These were just clutter passthroughs.
Of course, these changes are reflected in the library too. For instance, whereas before you'd invoke Attack
with a slice of Targets
, now you need to provide a Targeter
. Please refer to the updated godocs.
This is a rather massive release in terms of code changes but the improvements are worth it. Please report any bugs or inconsistencies.
Cheers,
Tomás