Commit 06f08eb1 authored by Nick Craver's avatar Nick Craver

Cleanup test messages

parent 40caec6b
...@@ -300,8 +300,7 @@ public void TestQuit() ...@@ -300,8 +300,7 @@ public void TestQuit()
var watch = Stopwatch.StartNew(); var watch = Stopwatch.StartNew();
Assert.Throws<RedisConnectionException>(() => db.Ping()); Assert.Throws<RedisConnectionException>(() => db.Ping());
watch.Stop(); watch.Stop();
Output.WriteLine("Time to notice quit: {0}ms ({1})", watch.ElapsedMilliseconds, Output.WriteLine("Time to notice quit: {0}ms (any order)", watch.ElapsedMilliseconds);
"any order");
Thread.Sleep(20); Thread.Sleep(20);
Debug.WriteLine("Pinging..."); Debug.WriteLine("Pinging...");
Assert.Equal(key, (string)db.StringGet(key)); Assert.Equal(key, (string)db.StringGet(key));
...@@ -322,8 +321,7 @@ public async Task TestSevered() ...@@ -322,8 +321,7 @@ public async Task TestSevered()
var watch = Stopwatch.StartNew(); var watch = Stopwatch.StartNew();
db.Ping(); db.Ping();
watch.Stop(); watch.Stop();
Output.WriteLine("Time to re-establish: {0}ms ({1})", watch.ElapsedMilliseconds, Output.WriteLine("Time to re-establish: {0}ms (any order)", watch.ElapsedMilliseconds);
"any order");
await Task.Delay(2000).ForAwait(); await Task.Delay(2000).ForAwait();
Debug.WriteLine("Pinging..."); Debug.WriteLine("Pinging...");
Assert.Equal(key, db.StringGet(key)); Assert.Equal(key, db.StringGet(key));
......
...@@ -36,9 +36,8 @@ public async Task MassiveBulkOpsAsync(bool withContinuation) ...@@ -36,9 +36,8 @@ public async Task MassiveBulkOpsAsync(bool withContinuation)
} }
Assert.Equal(AsyncOpsQty, await conn.StringGetAsync(key).ForAwait()); Assert.Equal(AsyncOpsQty, await conn.StringGetAsync(key).ForAwait());
watch.Stop(); watch.Stop();
Output.WriteLine("{2}: Time for {0} ops: {1}ms ({3}, {4}); ops/s: {5}", AsyncOpsQty, watch.ElapsedMilliseconds, Me(), Output.WriteLine("{2}: Time for {0} ops: {1}ms ({3}, any order); ops/s: {4}", AsyncOpsQty, watch.ElapsedMilliseconds, Me(),
withContinuation ? "with continuation" : "no continuation", "any order", withContinuation ? "with continuation" : "no continuation", AsyncOpsQty / watch.Elapsed.TotalSeconds);
AsyncOpsQty / watch.Elapsed.TotalSeconds);
} }
} }
...@@ -68,9 +67,8 @@ public void MassiveBulkOpsSync(int threads) ...@@ -68,9 +67,8 @@ public void MassiveBulkOpsSync(int threads)
int val = (int)conn.StringGet(key); int val = (int)conn.StringGet(key);
Assert.Equal(workPerThread * threads, val); Assert.Equal(workPerThread * threads, val);
Output.WriteLine("{2}: Time for {0} ops on {4} threads: {1}ms ({3}); ops/s: {5}", Output.WriteLine("{2}: Time for {0} ops on {3} threads: {1}ms (any order); ops/s: {4}",
threads * workPerThread, timeTaken.TotalMilliseconds, Me() threads * workPerThread, timeTaken.TotalMilliseconds, Me(), threads, (workPerThread * threads) / timeTaken.TotalSeconds);
, "any order", threads, (workPerThread * threads) / timeTaken.TotalSeconds);
#if DEBUG #if DEBUG
long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount(); long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount();
Output.WriteLine("ResultBox allocations: {0}", newAlloc - oldAlloc); Output.WriteLine("ResultBox allocations: {0}", newAlloc - oldAlloc);
...@@ -106,9 +104,8 @@ public void MassiveBulkOpsFireAndForget(int threads) ...@@ -106,9 +104,8 @@ public void MassiveBulkOpsFireAndForget(int threads)
var val = (long)conn.StringGet(key); var val = (long)conn.StringGet(key);
Assert.Equal(perThread * threads, val); Assert.Equal(perThread * threads, val);
Output.WriteLine("{2}: Time for {0} ops over {5} threads: {1:###,###}ms ({3}); ops/s: {4:###,###,##0}", Output.WriteLine("{2}: Time for {0} ops over {4} threads: {1:###,###}ms (any order); ops/s: {3:###,###,##0}",
val, elapsed.TotalMilliseconds, Me(), val, elapsed.TotalMilliseconds, Me(),
"any order",
val / elapsed.TotalSeconds, threads); val / elapsed.TotalSeconds, threads);
#if DEBUG #if DEBUG
long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount(); long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount();
......
...@@ -32,7 +32,7 @@ public void Execute() ...@@ -32,7 +32,7 @@ public void Execute()
// the pool will end up doing everything on one thread // the pool will end up doing everything on one thread
}); });
Output.WriteLine(""); Output.WriteLine("");
Output.WriteLine("Sending ({0})...", "any order"); Output.WriteLine("Sending (any order)...");
lock (received) lock (received)
{ {
received.Clear(); received.Clear();
......
...@@ -35,8 +35,7 @@ public void MassiveBulkOpsFireAndForgetSecure() ...@@ -35,8 +35,7 @@ public void MassiveBulkOpsFireAndForgetSecure()
int val = (int)conn.StringGet(key); int val = (int)conn.StringGet(key);
Assert.Equal(AsyncOpsQty, val); Assert.Equal(AsyncOpsQty, val);
watch.Stop(); watch.Stop();
Output.WriteLine("{2}: Time for {0} ops: {1}ms ({3}); ops/s: {4}", AsyncOpsQty, watch.ElapsedMilliseconds, Me(), Output.WriteLine("{2}: Time for {0} ops: {1}ms (any order); ops/s: {3}", AsyncOpsQty, watch.ElapsedMilliseconds, Me(),
"any order",
AsyncOpsQty / watch.Elapsed.TotalSeconds); AsyncOpsQty / watch.Elapsed.TotalSeconds);
#if DEBUG #if DEBUG
long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount(); long newAlloc = ConnectionMultiplexer.GetResultBoxAllocationCount();
......
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