From 75f4268e601fbd6a0de050b5da4aa7767c86c513 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Thu, 5 Mar 2009 14:22:28 +0000 Subject: Minor benchmarking changes --- src/ProtoBench/Program.cs | 3 +++ src/ProtoBench/ProtoBench.csproj | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ProtoBench/Program.cs b/src/ProtoBench/Program.cs index e23a4c5c..c6b52648 100644 --- a/src/ProtoBench/Program.cs +++ b/src/ProtoBench/Program.cs @@ -67,6 +67,7 @@ namespace Google.ProtocolBuffers.ProtoBench .WeakMergeFrom(CodedInputStream.CreateInstance(inputStream)) .WeakBuild(); }); + Console.WriteLine(); return true; } catch (Exception e) { Console.Error.WriteLine("Error: {0}", e.Message); @@ -97,6 +98,8 @@ namespace Google.ProtocolBuffers.ProtoBench } private static TimeSpan TimeAction(Action action, int iterations) { + GC.Collect(); + GC.WaitForPendingFinalizers(); Stopwatch sw = Stopwatch.StartNew(); for (int i = 0; i < iterations; i++) { action(); diff --git a/src/ProtoBench/ProtoBench.csproj b/src/ProtoBench/ProtoBench.csproj index c0269f01..efcd82c1 100644 --- a/src/ProtoBench/ProtoBench.csproj +++ b/src/ProtoBench/ProtoBench.csproj @@ -38,8 +38,6 @@ - - -- cgit v1.2.3