[smuxi/experiments/certfp: 46/55] Frontend: enhanced output of /benchmark_message_builder command



commit 89acc89ed6c12f766dc491b2959106d620e0e96d
Author: Mirco Bauer <meebey meebey net>
Date:   Sat Jan 11 18:59:00 2014 +0100

    Frontend: enhanced output of /benchmark_message_builder command

 src/Frontend/CommandManager.cs |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/src/Frontend/CommandManager.cs b/src/Frontend/CommandManager.cs
index 6144e4d..c450557 100644
--- a/src/Frontend/CommandManager.cs
+++ b/src/Frontend/CommandManager.cs
@@ -418,26 +418,24 @@ namespace Smuxi.Frontend
             stop = DateTime.UtcNow;
 
             builder = new MessageBuilder();
+            builder.AppendText("MessageBuilder().");
             if (appendMessage) {
-                builder.AppendText("builder.AppendMessage() ");
+                builder.AppendText("AppendMessage().");
             }
             if (appendText) {
-                builder.AppendText("builder.AppendText() ");
+                builder.AppendText("AppendText().");
             }
             if (appendEvent) {
-                builder.AppendText("builder.AppendEventPrefix() ");
+                builder.AppendText("AppendEventPrefix().");
             }
             if (appendFormat) {
-                builder.AppendText("builder.AppendFormat() ");
+                builder.AppendText("AppendFormat().");
             }
             if (toMessage) {
-                builder.AppendText("builder.ToMessage() ");
-            }
-            if (!appendMessage && !appendText && !toMessage) {
-                builder.AppendText("MessageBuilder() ");
+                builder.AppendText("ToMessage()");
             }
             builder.AppendText(
-                "count: {1} took: {2:0} ms avg: {3:0.00} ms",
+                " count: {1} took: {2:0} ms avg: {3:0.00} ms",
                 cmd.Data,
                 count,
                 (stop - start).TotalMilliseconds,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]