Adjusted code for vegeta from https://github.com/almir/vegeta