This PR adds strict mode and response body context.
The latter simply means that when a non-204 status is returned, rather than just printing the status code, we'll also get the response body error message too. For example:
⇒ influx-stress insert --host http://localhost:8186 -c all --pps 10000 -n 10000
Using point template: ctr,some=tag n=0i <timestamp>
Using batch size of 10000 line(s)
Spreading writes across 100000 series
Throttling output to ~10000 points/sec
Using 1 concurrent writer(s)
Running until ~10000 points sent or until ~2562047h47m16.854775807s has elapsed
[2017-01-30 16:45:25] Unexpected write: status 500 , body: {"error":"partial write"}
Write Throughput: 9977
Points Written: 10000
Note the body: {"error":"partial write"}.
Strict mode adds a new flag to the influx-stress tool. Strict mode will terminate the process as soon as an error or a non-204 status code is received when writing to the server.
It's activated like this: influx-stress insert -c all --pps 10000 -n 1000000 --strict
This PR adds strict mode and response body context.
The latter simply means that when a non-204 status is returned, rather than just printing the status code, we'll also get the response body error message too. For example:
Note the
body: {"error":"partial write"}
.Strict mode adds a new flag to the
influx-stress
tool. Strict mode will terminate the process as soon as an error or a non-204 status code is received when writing to the server.It's activated like this:
influx-stress insert -c all --pps 10000 -n 1000000 --strict