Skip to content

Instantly share code, notes, and snippets.

@dmitryhd
Last active November 9, 2018 08:31
Show Gist options
  • Select an option

  • Save dmitryhd/ae241260d47e5658eb0ebd309984677d to your computer and use it in GitHub Desktop.

Select an option

Save dmitryhd/ae241260d47e5658eb0ebd309984677d to your computer and use it in GitHub Desktop.
Vegeta POST JSON load test

To load test simple POST json

setup

brew update && brew install vegeta

Run

echo '{"title": "рыба"}' > body.json
echo 'POST http://service.url/1/get_item_vector' | vegeta attack -body body.json -header 'Content-Type: application/json' -rate=10 -duration=1s | vegeta report

Result

Requests      [total, rate]            10, 11.07
Duration      [total, attack, wait]    951.27329ms, 902.986205ms, 48.287085ms
Latencies     [mean, 50, 95, 99, max]  100.293536ms, 34.523005ms, 384.433848ms, 384.433848ms, 384.433848ms
Bytes In      [total, mean]            2120, 212.00
Bytes Out     [total, mean]            650, 65.00
Success       [ratio]                  100.00%
Status Codes  [code:count]             200:10
Error Set:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment