aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Skeet <skeet@pobox.com>2009-03-05 14:22:28 +0000
committerJon Skeet <skeet@pobox.com>2009-03-05 14:22:28 +0000
commit75f4268e601fbd6a0de050b5da4aa7767c86c513 (patch)
tree12b7a8b91d09f7cfda6d8eae2441a8cff276a017 /src
parent6678a73b0dfc3ac92bbf8102be1cfd3b3c6a9d60 (diff)
downloadprotobuf-75f4268e601fbd6a0de050b5da4aa7767c86c513.tar.gz
protobuf-75f4268e601fbd6a0de050b5da4aa7767c86c513.tar.bz2
protobuf-75f4268e601fbd6a0de050b5da4aa7767c86c513.zip
Minor benchmarking changes
Diffstat (limited to 'src')
-rw-r--r--src/ProtoBench/Program.cs3
-rw-r--r--src/ProtoBench/ProtoBench.csproj2
2 files changed, 3 insertions, 2 deletions
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 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="BenchmarkProtoFile.cs" />
- <Compile Include="BenchmarkSpeedProtoFile.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>