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

Account response read time for http prober #363

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

bobrik
Copy link
Contributor

@bobrik bobrik commented Sep 25, 2018

Withot this change transfer time is near zero, because trace.end time is clocked when response body is available, not when it's read.

cc @discordianfish

prober/http.go Outdated
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()
}()
requestErrored := err != nil
Copy link
Contributor

Choose a reason for hiding this comment

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

It'd be usual to put parens around the RHS here

prober/http.go Outdated
resp.Body.Close()
}

// At this point body is fully read and we can write end time
Copy link
Contributor

Choose a reason for hiding this comment

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

Full stop

prober/http.go Show resolved Hide resolved
@bobrik bobrik force-pushed the transfer-time-fix branch 2 times, most recently from 8550dd0 to 6bf5cc5 Compare September 27, 2018 17:36
Withot this change `transfer` time is near zero, because `trace.end`
time is clocked when response body is available, not when it's read.

Signed-off-by: Ivan Babrou <[email protected]>
@brian-brazil brian-brazil merged commit 5cbb084 into prometheus:master Oct 4, 2018
@brian-brazil
Copy link
Contributor

Thanks!

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