aboutsummaryrefslogtreecommitdiff
path: root/src/ProtoBench/Program.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-06-08 15:50:58 -0500
committerrogerk <devnull@localhost>2011-06-08 15:50:58 -0500
commit2772dfe8a1eae7c942bb50d84bda3f45b5d7b683 (patch)
tree0171c98d38d419780317398595c511810a19e203 /src/ProtoBench/Program.cs
parent0e2d144eb6e08f841ed4476cfff23ad462bbbcd9 (diff)
downloadprotobuf-2772dfe8a1eae7c942bb50d84bda3f45b5d7b683.tar.gz
protobuf-2772dfe8a1eae7c942bb50d84bda3f45b5d7b683.tar.bz2
protobuf-2772dfe8a1eae7c942bb50d84bda3f45b5d7b683.zip
Performance fix for float/double write bytes. Performance fix, do not use Array.Copy.
Diffstat (limited to 'src/ProtoBench/Program.cs')
-rw-r--r--src/ProtoBench/Program.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ProtoBench/Program.cs b/src/ProtoBench/Program.cs
index 7d91bbed..36f7850d 100644
--- a/src/ProtoBench/Program.cs
+++ b/src/ProtoBench/Program.cs
@@ -87,6 +87,7 @@ namespace Google.ProtocolBuffers.ProtoBench
Console.Error.WriteLine("(You can specify multiple pairs of descriptor type name and input data.)");
return 1;
}
+
bool success = true;
for (int i = 0; i < args.Length; i += 2)
{
@@ -94,7 +95,7 @@ namespace Google.ProtocolBuffers.ProtoBench
}
return success ? 0 : 1;
}
-
+
/// <summary>
/// Runs a single test. Error messages are displayed to Console.Error, and the return value indicates
/// general success/failure.
@@ -185,7 +186,7 @@ namespace Google.ProtocolBuffers.ProtoBench
double first = (iterations * dataSize) / (elapsed.TotalSeconds * 1024 * 1024);
if (Verbose) Console.WriteLine("Round ---: Count = {1,6}, Bps = {2,8:f3}", 0, iterations, first);
elapsed = TimeSpan.Zero;
- int max = FastTest ? 30 : 100;
+ int max = FastTest ? 10 : 30;
while (runs < max)
{