From 76e46d0158461a29e6ef358ba8cb7b7323cc0c05 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 23 Jul 2013 17:23:16 +0100 Subject: Improve spacing between data and units on console stats display --- OpenSim/Framework/Monitoring/Stats/Stat.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Monitoring') diff --git a/OpenSim/Framework/Monitoring/Stats/Stat.cs b/OpenSim/Framework/Monitoring/Stats/Stat.cs index cc2c947..f2329ce 100644 --- a/OpenSim/Framework/Monitoring/Stats/Stat.cs +++ b/OpenSim/Framework/Monitoring/Stats/Stat.cs @@ -225,7 +225,13 @@ namespace OpenSim.Framework.Monitoring public virtual string ToConsoleString() { StringBuilder sb = new StringBuilder(); - sb.AppendFormat("{0}.{1}.{2} : {3} {4}", Category, Container, ShortName, Value, UnitName); + sb.AppendFormat( + "{0}.{1}.{2} : {3}{4}", + Category, + Container, + ShortName, + Value, + UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); AppendMeasuresOfInterest(sb); @@ -281,8 +287,11 @@ namespace OpenSim.Framework.Monitoring double averageChangeOverTime = totalChange / divisor / (Watchdog.WATCHDOG_INTERVAL_MS / 1000); sb.AppendFormat( - ", {0:0.##} {1}/s, {2:0.##} {3}/s", - lastChangeOverTime, UnitName, averageChangeOverTime, UnitName); + ", {0:0.##}{1}/s, {2:0.##}{3}/s", + lastChangeOverTime, + UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName), + averageChangeOverTime, + UnitName == null || UnitName == "" ? "" : string.Format(" {0}", UnitName)); } } } -- cgit v1.1