Minor benchmarking changes
diff --git a/src/ProtoBench/Program.cs b/src/ProtoBench/Program.cs
index e23a4c5..c6b5264 100644
--- a/src/ProtoBench/Program.cs
+++ b/src/ProtoBench/Program.cs
@@ -67,6 +67,7 @@
.WeakMergeFrom(CodedInputStream.CreateInstance(inputStream))
.WeakBuild();
});
+ Console.WriteLine();
return true;
} catch (Exception e) {
Console.Error.WriteLine("Error: {0}", e.Message);
@@ -97,6 +98,8 @@
}
private static TimeSpan TimeAction(Action action, int iterations) {
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
Stopwatch sw = Stopwatch.StartNew();
for (int i = 0; i < iterations; i++) {
action();