nakabonne / ali

Generate HTTP load and plot the results in real-time
MIT License
3.74k stars 143 forks source link

Support HTTP2 option #29

Closed nakabonne closed 4 years ago

nakabonne commented 4 years ago

Only tiny changes are required because all we have to do is just pass to the Vegeta API.

shubham14bajpai commented 4 years ago

Hi @nakabonne I would like to work on this. The changes would be as simple as

opts.Attacker = vegeta.NewAttacker(
    vegeta.Timeout(opts.Timeout),
    vegeta.Workers(opts.Workers),
    vegeta.MaxWorkers(opts.MaxWorkers),
    vegeta.MaxBody(opts.MaxBody),
    vegeta.KeepAlive(opts.KeepAlive),
    vegeta.HTTP2(true),
)

in the below file. Right? Or do we need to identify somehow whether the server supports HTTP2? Just wanted to make sure I understand the changes required before raising a PR. https://github.com/nakabonne/ali/blob/fb9a8397e53c8647a3ab6d95d5f8e5c7be3c115f/attacker/attacker.go#L75

nakabonne commented 4 years ago

@shubham14bajpai

The changes would be as simple as

Exactly. All we have to do is just pass the value received from the flag to vegeta. Look forward to your PR!

shubham14bajpai commented 4 years ago

@nakabonne I have raised a PR for the same https://github.com/nakabonne/ali/pull/49

nakabonne commented 4 years ago

Closing since this was resolved by #49