Skip to content

Getting pool statistics #1173

Answered by bgrainger
NiKiZe asked this question in Q&A
May 19, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

MySqlConnector.Core.ConnectionPool.s_pools will contain all known connection pools:

private static readonly ConcurrentDictionary<string, ConnectionPool?> s_pools = new();

MySqlConnector.Core.ConnectionPool.m_sessions.Count has the number of idle (pooled) sessions:

private readonly LinkedList<ServerSession> m_sessions;

MySqlConnector.Core.ConnectionPool.m_leasedSessions.Count has the number of active (in-use) sessions:

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@NiKiZe
Comment options

Answer selected by NiKiZe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants