60 Interlocked.Exchange(ref _readOps, _readOps + stats.
ReadOps);
61 Interlocked.Exchange(ref _computeOps, _computeOps + stats.
ComputeOps);
62 Interlocked.Exchange(ref _writeOps, _writeOps + stats.
WriteOps);
63 Interlocked.Exchange(ref _queryTimeMs, _queryTimeMs + stats.
QueryTimeMs);
64 Interlocked.Exchange(ref _contentionRetries, _contentionRetries + stats.
ContentionRetries);
65 Interlocked.Exchange(ref _storageBytesRead, _storageBytesRead + stats.
StorageBytesRead);
66 Interlocked.Exchange(ref _storageBytesWrite, _storageBytesWrite + stats.
StorageBytesWrite);
72 case RateLimitReadOps:
73 Interlocked.Increment(ref _rateLimitedComputeQueryCount);
75 case RateLimitComputeOps:
76 Interlocked.Increment(ref _rateLimitedComputeQueryCount);
78 case RateLimitWriteOps:
79 Interlocked.Increment(ref _rateLimitedWriteQueryCount);
84 Interlocked.Increment(ref _queryCount);
92 ComputeOps = _computeOps,
94 QueryTimeMs = _queryTimeMs,
95 ContentionRetries = _contentionRetries,
96 StorageBytesRead = _storageBytesRead,
97 StorageBytesWrite = _storageBytesWrite,
98 QueryCount = _queryCount,
99 RateLimitedReadQueryCount = _rateLimitedReadQueryCount,
100 RateLimitedComputeQueryCount = _rateLimitedComputeQueryCount,
101 RateLimitedWriteQueryCount = _rateLimitedWriteQueryCount
107 var beforeReset =
new Stats
109 ReadOps = Interlocked.Exchange(ref _readOps, 0),
110 ComputeOps = Interlocked.Exchange(ref _computeOps, 0),
111 WriteOps = Interlocked.Exchange(ref _writeOps, 0),
112 QueryTimeMs = Interlocked.Exchange(ref _queryTimeMs, 0),
113 ContentionRetries = Interlocked.Exchange(ref _contentionRetries, 0),
114 StorageBytesRead = Interlocked.Exchange(ref _storageBytesRead, 0),
115 StorageBytesWrite = Interlocked.Exchange(ref _storageBytesWrite, 0),
116 QueryCount = Interlocked.Exchange(ref _queryCount, 0),
117 RateLimitedReadQueryCount = Interlocked.Exchange(ref _rateLimitedReadQueryCount, 0),
118 RateLimitedComputeQueryCount = Interlocked.Exchange(ref _rateLimitedComputeQueryCount, 0),
119 RateLimitedWriteQueryCount = Interlocked.Exchange(ref _rateLimitedWriteQueryCount, 0)