Skip to content
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

metrics: Add Throughput to Metrics #420

Merged
merged 2 commits into from
Jul 19, 2019
Merged

metrics: Add Throughput to Metrics #420

merged 2 commits into from
Jul 19, 2019

Conversation

tsenart
Copy link
Owner

@tsenart tsenart commented Jul 19, 2019

This commit adds a Throughput field to the Metrics struct which
represents the rate of successful requests per second. It is calculated
by dividing the number of successful requests by the time span in
seconds starting from the beginning of the earliest request in the
result set and ending in the time the very last response arrived.

tsenart added 2 commits July 19, 2019 12:13
This commit adds a `Throughput` field to the `Metrics` struct which
represents the rate of successful requests per second. It is calculated
by dividing the number of successful requests by the time span in
seconds starting from the beginning of the earliest request in the
result set and ending in the time the very last response arrived.
@tsenart tsenart requested a review from xla as a code owner July 19, 2019 10:28
@@ -20,8 +24,10 @@ func main() {
}
}(time.Now())

http.ListenAndServe(os.Args[1], http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
atomic.AddUint64(&count, 1)
http.ListenAndServe(flag.Arg(0), http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of http.ListenAndServe is not checked (from errcheck)

@tsenart tsenart merged commit f807d60 into master Jul 19, 2019
@tsenart tsenart deleted the report-throughput branch July 19, 2019 12:11
@raul1991
Copy link

@tsenart Superb tool!

Upon reading the documentation, I couldn't find a way to plot the throughput captured as part of the report. Can the doc be updated with that or is there any link I can read it on ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants