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

feat: expose pool permit wait times #1860

Closed
wants to merge 2 commits into from

Commits on May 9, 2022

  1. feat: expose pool permit wait times

    This commit adds a new pool_wait_duration() method to the Pool,
    returning the total duration of time this Pool instance has spent
    waiting to acquire a permit from the pool semaphore (rounded to the
    nearest millisecond).
    
    This allows users to quantify the saturation of the connection pool
    (USE-style metrics) and identify when the workload exceeds the available
    pool capacity.
    
    Both measuring the pool permit wait duration, and retrieving the
    measured value are cheap operations.
    domodwyer committed May 9, 2022
    Configuration menu
    Copy the full SHA
    bdaea31 View commit details
    Browse the repository at this point in the history
  2. test: assert pool wait upper bound

    An upper bound of the pool wait time can be calculated in the
    pool_wait_duration_counter_increases() test to further assert
    correctness.
    domodwyer committed May 9, 2022
    Configuration menu
    Copy the full SHA
    226539d View commit details
    Browse the repository at this point in the history