Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit c9e9dab

Browse files
committed
Add API for TotalPendingDeactivatedClients
1 parent cf740b6 commit c9e9dab

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/ServiceStack.Redis/RedisStats.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public static long TotalFailedSentinelWorkers
3737
get { return Interlocked.Read(ref RedisState.TotalFailedSentinelWorkers); }
3838
}
3939

40-
4140
/// <summary>
4241
/// Number of times we've forced Sentinel to failover to another master due to
4342
/// consecutive errors beyond sentinel.WaitBeforeForcingMasterFailover
@@ -119,6 +118,14 @@ public static long TotalRetryTimedout
119118
get { return Interlocked.Read(ref RedisState.TotalRetryTimedout); }
120119
}
121120

121+
/// <summary>
122+
/// Total number of deactivated clients that are pending being disposed
123+
/// </summary>
124+
public static long TotalPendingDeactivatedClients
125+
{
126+
get { return RedisState.DeactivatedClients.Count; }
127+
}
128+
122129
public static void Reset()
123130
{
124131
Interlocked.Exchange(ref RedisState.TotalFailovers, 0);
@@ -151,7 +158,7 @@ public static Dictionary<string, long> ToDictionary()
151158
{"TotalClientsCreatedOutsidePool", TotalClientsCreatedOutsidePool},
152159
{"TotalSubjectiveServersDown", TotalSubjectiveServersDown},
153160
{"TotalObjectiveServersDown", TotalObjectiveServersDown},
154-
{"TotalPendingDeactivatedClients", RedisState.DeactivatedClients.Count },
161+
{"TotalPendingDeactivatedClients", TotalPendingDeactivatedClients },
155162
{"TotalRetryCount", TotalRetryCount },
156163
{"TotalRetrySuccess", TotalRetrySuccess },
157164
{"TotalRetryTimedout", TotalRetryTimedout },

0 commit comments

Comments
 (0)