Skip to content
This repository has been archived by the owner on Dec 30, 2019. It is now read-only.

Emit 'release' event and add 'activeCount' gettable property to pool #124

Open
PrimeJunta opened this issue May 20, 2019 · 1 comment
Open

Comments

@PrimeJunta
Copy link

Currently the pool only tracks total clients and pending connections. It would be extremely useful to be able to know how many clients are checked-out (active) at any given time, as this would make it easy to create unit tests specifically to test for bugs that leak clients.

PrimeJunta pushed a commit to PrimeJunta/node-pg-pool that referenced this issue May 20, 2019
PrimeJunta pushed a commit to PrimeJunta/node-pg-pool that referenced this issue May 21, 2019
@ghost
Copy link

ghost commented Sep 22, 2019

You can just do pool.totalCount - pool.idleCount to get the active client count

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

No branches or pull requests

1 participant