tsenart / vegeta

HTTP load testing tool and library. It's over 9000!
http://godoc.org/github.com/tsenart/vegeta/lib
MIT License
23.51k stars 1.36k forks source link

Make the flags and types public for reuse #499

Closed bzon closed 4 years ago

bzon commented 4 years ago

Proposal

Make the flags and types public so we can use the same flags when we build our own vegeta attacker binary.

tsenart commented 4 years ago

I don't understand this proposal. Please elaborate appropriately.

bzon commented 4 years ago

@tsenart we are trying to use vegeta as a library to customize our attack code. Our goal is to build a new binary out of our custom code.

We want to use the same fs.FlagSet that the main vegeta code is using but we cannot because they are private or unexported.

https://github.com/tsenart/vegeta/blob/master/attack.go

tsenart commented 4 years ago

I see. In the meantime, can't you fork vegeta and change the code directly to your needs?

bzon commented 4 years ago

@tsenart yep! I actually did that.

tsenart commented 4 years ago

I don't think this is a common enough use case that it justifies the added API surface. I think forking is a fine approach.