From 2772dfe8a1eae7c942bb50d84bda3f45b5d7b683 Mon Sep 17 00:00:00 2001 From: csharptest Date: Wed, 8 Jun 2011 15:50:58 -0500 Subject: Performance fix for float/double write bytes. Performance fix, do not use Array.Copy. --- src/ProtoBench/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ProtoBench/Program.cs') 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; } - + /// /// 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) { -- cgit v1.2.3