Commit 40caec6b authored by Nick Craver's avatar Nick Craver

Fix debug test build

parent 6aee9105
...@@ -17,9 +17,6 @@ public class MassiveOps : TestBase ...@@ -17,9 +17,6 @@ public class MassiveOps : TestBase
[InlineData(false)] [InlineData(false)]
public async Task MassiveBulkOpsAsync(bool withContinuation) public async Task MassiveBulkOpsAsync(bool withContinuation)
{ {
#if DEBUG
var oldAsyncCompletionCount = ConnectionMultiplexer.GetAsyncCompletionWorkerCount();
#endif
using (var muxer = Create()) using (var muxer = Create())
{ {
RedisKey key = "MBOA"; RedisKey key = "MBOA";
...@@ -60,7 +57,6 @@ public void MassiveBulkOpsSync(int threads) ...@@ -60,7 +57,6 @@ public void MassiveBulkOpsSync(int threads)
conn.KeyDelete(key); conn.KeyDelete(key);
#if DEBUG #if DEBUG
long oldAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount(); long oldAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount();
long oldWorkerCount = ConnectionMultiplexer.GetAsyncCompletionWorkerCount();
#endif #endif
var timeTaken = RunConcurrent(delegate var timeTaken = RunConcurrent(delegate
{ {
...@@ -77,8 +73,7 @@ public void MassiveBulkOpsSync(int threads) ...@@ -77,8 +73,7 @@ public void MassiveBulkOpsSync(int threads)
, "any order", threads, (workPerThread * threads) / timeTaken.TotalSeconds); , "any order", threads, (workPerThread * threads) / timeTaken.TotalSeconds);
#if DEBUG #if DEBUG
long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount(); long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount();
long newWorkerCount = ConnectionMultiplexer.GetAsyncCompletionWorkerCount(); Output.WriteLine("ResultBox allocations: {0}", newAlloc - oldAlloc);
Output.WriteLine("ResultBox allocations: {0}; workers {1}", newAlloc - oldAlloc, newWorkerCount - oldWorkerCount);
Assert.True(newAlloc - oldAlloc <= 2 * threads, "number of box allocations"); Assert.True(newAlloc - oldAlloc <= 2 * threads, "number of box allocations");
#endif #endif
} }
......
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