*!This is a WIP!*

This tool tries to help with load testing Visage API endpoints.

It makes use of Vegta to perform the target attacking.
The main feature it has is the ability to run a ramp up load test. I.e a load test from a start TPS to an end TPS that increases in discrete steps.

# Build
go build

# Usage
```bash
./load-test-tool -help
Usage of ./load-test-tool:
  -api-base string
    	Base endpoint for API (default "https://api.us-east-1.twitch.tv")
  -api-path string
    	API endpoint to hit (default "/kraken/streams/featured")
  -client-id string
    	Client-ID to use for the request (default "zoyuadrkem29ake6z6lvvh7jokg90e")
  -duration uint
    	Duration in seconds for the total test (default 300)
  -max-rps uint
    	RPS to finish load testing at (default 1000)
  -start-rps uint
    	RPS to start load testing from (default 10)
```

You can pass in any of the above options to customize the endpoint you want to test.

# Example Output
```
Load testing endpoint https://api.us-east-1.twitch.tv/kraken/streams/featured from 10 rps to 1000 rps for 60.000000 second(s)...

Load testing at 10 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 10 rps: 381.516063ms
95th percentile at 10 rps: 584.077256ms
99th percentile at 10 rps: 777.344256ms

Load testing at 175 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 175 rps: 359.442354ms
95th percentile at 175 rps: 602.372216ms
99th percentile at 175 rps: 765.787882ms

Load testing at 340 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 340 rps: 363.388396ms
95th percentile at 340 rps: 649.668888ms
99th percentile at 340 rps: 7.570845774s

Load testing at 505 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 505 rps: 360.011939ms
95th percentile at 505 rps: 602.355125ms
99th percentile at 505 rps: 826.923275ms

Load testing at 670 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 670 rps: 356.452607ms
95th percentile at 670 rps: 596.044104ms
99th percentile at 670 rps: 819.093453ms

Load testing at 835 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 835 rps: 359.988074ms
95th percentile at 835 rps: 766.209954ms
99th percentile at 835 rps: 2.17283586s

Load testing at 1000 rps for 10.000000 second(s).
Success: 1.000000
50th percentile at 1000 rps: 349.063758ms
95th percentile at 1000 rps: 809.417894ms
99th percentile at 1000 rps: 4.528267491s

Overall 50th percentile: 355.426979ms
Overall 95th percentile: 670.658122ms
Overall 99th percentile: 2.853183208s
```


* Success - referes to the fraction of requests that returned with a 2xx 3xx response. 1.0 means all requests were successful
* Currently only 50th, 95th and 99th percentiles are generated.
* The Overall percentiles represent the percentile for the entire test period. I.e all the steps combined.
