diff options
Diffstat (limited to 'OpenSim/Framework/Monitoring')
-rw-r--r-- | OpenSim/Framework/Monitoring/StatsManager.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs index a67c5f8..d365190 100644 --- a/OpenSim/Framework/Monitoring/StatsManager.cs +++ b/OpenSim/Framework/Monitoring/StatsManager.cs | |||
@@ -126,8 +126,7 @@ namespace OpenSim.Framework.Monitoring | |||
126 | { | 126 | { |
127 | foreach (Stat stat in container.Values) | 127 | foreach (Stat stat in container.Values) |
128 | { | 128 | { |
129 | con.OutputFormat( | 129 | con.Output(stat.ToConsoleString()); |
130 | "{0}.{1}.{2} : {3}{4}", stat.Category, stat.Container, stat.ShortName, stat.Value, stat.UnitName); | ||
131 | } | 130 | } |
132 | } | 131 | } |
133 | } | 132 | } |
@@ -330,6 +329,12 @@ namespace OpenSim.Framework.Monitoring | |||
330 | { | 329 | { |
331 | return string.Format("{0}+{1}+{2}", container, category, shortName); | 330 | return string.Format("{0}+{1}+{2}", container, category, shortName); |
332 | } | 331 | } |
332 | |||
333 | public virtual string ToConsoleString() | ||
334 | { | ||
335 | return string.Format( | ||
336 | "{0}.{1}.{2} : {3}{4}", Category, Container, ShortName, Value, UnitName); | ||
337 | } | ||
333 | } | 338 | } |
334 | 339 | ||
335 | public class PercentageStat : Stat | 340 | public class PercentageStat : Stat |
@@ -358,8 +363,13 @@ namespace OpenSim.Framework.Monitoring | |||
358 | 363 | ||
359 | public PercentageStat( | 364 | public PercentageStat( |
360 | string shortName, string name, string category, string container, StatVerbosity verbosity, string description) | 365 | string shortName, string name, string category, string container, StatVerbosity verbosity, string description) |
361 | : base(shortName, name, "%", category, container, verbosity, description) | 366 | : base(shortName, name, "%", category, container, verbosity, description) {} |
367 | |||
368 | public override string ToConsoleString() | ||
362 | { | 369 | { |
370 | return string.Format( | ||
371 | "{0}.{1}.{2} : {3:0.###}{4} ({5}/{6})", | ||
372 | Category, Container, ShortName, Value, UnitName, Antecedent, Consequent); | ||
363 | } | 373 | } |
364 | } | 374 | } |
365 | } \ No newline at end of file | 375 | } \ No newline at end of file |