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

pool.Wait metric doesn't include timed out requests #825

Merged
merged 2 commits into from
Feb 18, 2017

Conversation

wvuong
Copy link
Contributor

@wvuong wvuong commented Feb 16, 2017

We noticed that the pool.Wait metric only captured the timings for successful connection requests and doesn't capture when a connection request times out.

I didn't want to mess with IMetricsTrackerDelegate.recordBorrowStats() so I created recordBorrowTimeoutStats() and implementation in MetricsTrackerDelegate instead. Feel free to tweak to your liking.

We noticed that the pool.Wait metric only captured the timings for successful connection requests and doesn't capture when a connection request times out.

I didn't want to mess with IMetricsTrackerDelegate.recordBorrowStats() so I created a recordBorrowTimeoutStats() and implementation in MetricsTrackerDelegate instead.  Feel free to tweak to your liking.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 77.305% when pulling 41900e0 on wvuong:dev into 5c8b359 on brettwooldridge:dev.

@brettwooldridge brettwooldridge merged commit 41900e0 into brettwooldridge:dev Feb 18, 2017
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.

None yet

3 participants