Skip to content
Browse files

Minor improvements to BZip2 performance test.

  • Loading branch information...
1 parent 2e193ec commit 4e071b370296da1979854ca2919ba8aeadf81669 @jfreilly jfreilly committed Dec 23, 2009
Showing with 5 additions and 5 deletions.
  1. +5 −5 tests/BZip2/Bzip2Tests.cs
View
10 tests/BZip2/Bzip2Tests.cs
@@ -102,8 +102,8 @@ public void Performance()
outStream_ = new BZip2OutputStream(window_, 1);
- long target = 0x10000000;
- readTarget_ = writeTarget_ = target;
+ const long Target = 0x10000000;
+ readTarget_ = writeTarget_ = Target;
Thread reader = new Thread(Reader);
reader.Name = "Reader";
@@ -118,12 +118,12 @@ public void Performance()
reader.Start();
- writer.Join();
- reader.Join();
+ Assert.IsTrue(writer.Join(TimeSpan.FromMinutes(5.0D)));
+ Assert.IsTrue(reader.Join(TimeSpan.FromMinutes(5.0D)));
DateTime endTime = DateTime.Now;
TimeSpan span = endTime - startTime;
- Console.WriteLine("Time {0} throughput {1} KB/Sec", span, (target / 1024) / span.TotalSeconds);
+ Console.WriteLine("Time {0} throughput {1} KB/Sec", span, (Target / 1024) / span.TotalSeconds);
}

0 comments on commit 4e071b3

Please sign in to comment.
Something went wrong with that request. Please try again.