-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add bucket histogram option #68
Conversation
Codecov Report
@@ Coverage Diff @@
## master #68 +/- ##
==========================================
- Coverage 76.50% 74.59% -1.91%
==========================================
Files 8 8
Lines 400 417 +17
==========================================
+ Hits 306 311 +5
- Misses 75 85 +10
- Partials 19 21 +2
Continue to review full report at Codecov.
|
@rzkmak Hey, thank you for your contribution! I can’t afford to check it, so I'll get back to you later :-) |
main.go
Outdated
@@ -81,6 +83,7 @@ func parseFlags(stdout, stderr io.Writer) (*cli, error) { | |||
flagSet.IntVarP(&c.connections, "connections", "c", attacker.DefaultConnections, "Amount of maximum open idle connections per target host") | |||
flagSet.BoolVar(&c.noHTTP2, "no-http2", false, "Don't issue HTTP/2 requests to servers which support it.") | |||
flagSet.StringVar(&c.localAddress, "local-addr", "0.0.0.0", "Local IP address.") | |||
flagSet.StringVar(&c.buckets, "buckets", "", "Histogram buckets.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flagSet.StringVar(&c.buckets, "buckets", "", "Histogram buckets.") | |
flagSet.StringVar(&c.buckets, "buckets", "", "Histogram buckets; comma-separated list.") |
main.go
Outdated
trimmedBucket := strings.TrimSpace(bucket) | ||
d, err := time.ParseDuration(trimmedBucket) | ||
if err != nil { | ||
log.Fatalf("Invalid bucket time format") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make it give back an error if even one of them fails?
main.go
Outdated
result := make([]time.Duration, 0) | ||
|
||
stringBuckets := strings.Split(rawBuckets, ",") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result := make([]time.Duration, 0) | |
stringBuckets := strings.Split(rawBuckets, ",") | |
stringBuckets := strings.Split(rawBuckets, ",") | |
result := make([]time.Duration, len(stringBuckets)) | |
thank you for the review 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you! i will add an ability to draw the histogram buckets, so your contribution will be available after that ;)
I'm trying to add an option for bucket histogram as in the #63 issue
But I'm not sure where I can put this part
Any feedback or suggestion would help me so much.
Thank you