Commit 8748d222 authored by Nick Craver's avatar Nick Craver

Cleanup: ConnectionCounters

parent a9ba66de
...@@ -99,6 +99,7 @@ internal void Add(ConnectionCounters other) ...@@ -99,6 +99,7 @@ internal void Add(ConnectionCounters other)
CompletedAsynchronously += other.CompletedAsynchronously; CompletedAsynchronously += other.CompletedAsynchronously;
CompletedSynchronously += other.CompletedSynchronously; CompletedSynchronously += other.CompletedSynchronously;
FailedAsynchronously += other.FailedAsynchronously; FailedAsynchronously += other.FailedAsynchronously;
NonPreferredEndpointCount += other.NonPreferredEndpointCount;
OperationCount += other.OperationCount; OperationCount += other.OperationCount;
PendingUnsentItems += other.PendingUnsentItems; PendingUnsentItems += other.PendingUnsentItems;
ResponsesAwaitingAsyncCompletion += other.ResponsesAwaitingAsyncCompletion; ResponsesAwaitingAsyncCompletion += other.ResponsesAwaitingAsyncCompletion;
...@@ -106,18 +107,23 @@ internal void Add(ConnectionCounters other) ...@@ -106,18 +107,23 @@ internal void Add(ConnectionCounters other)
SocketCount += other.SocketCount; SocketCount += other.SocketCount;
Subscriptions += other.Subscriptions; Subscriptions += other.Subscriptions;
WriterCount += other.WriterCount; WriterCount += other.WriterCount;
NonPreferredEndpointCount += other.NonPreferredEndpointCount;
} }
internal bool Any() internal bool Any()
{ {
return CompletedAsynchronously != 0 || CompletedSynchronously != 0 return CompletedAsynchronously != 0
|| FailedAsynchronously != 0 || OperationCount != 0 || CompletedSynchronously != 0
|| PendingUnsentItems != 0 || ResponsesAwaitingAsyncCompletion != 0 || FailedAsynchronously != 0
|| SentItemsAwaitingResponse != 0 || SocketCount != 0 || NonPreferredEndpointCount != 0
|| Subscriptions != 0 || WriterCount != 0 || OperationCount != 0
|| NonPreferredEndpointCount != 0; || PendingUnsentItems != 0
|| ResponsesAwaitingAsyncCompletion != 0
|| SentItemsAwaitingResponse != 0
|| SocketCount != 0
|| Subscriptions != 0
|| WriterCount != 0;
} }
internal void Append(StringBuilder sb) internal void Append(StringBuilder sb)
{ {
sb.Append("ops=").Append(OperationCount).Append(", qu=").Append(PendingUnsentItems) sb.Append("ops=").Append(OperationCount).Append(", qu=").Append(PendingUnsentItems)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment