From 3355bedaeb26b07b6b91c5de194991acaf2cdf36 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 21 Jul 2014 23:08:15 +0100 Subject: minor: Limit processor related stats to 3 decimal places instead of all the places. Easier to read and analyze, and probably still too much detail (1 dp would probably be fine) --- OpenSim/Framework/Monitoring/ServerStatsCollector.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Monitoring/ServerStatsCollector.cs') diff --git a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs index b4e0b16..ff0fcd5 100644 --- a/OpenSim/Framework/Monitoring/ServerStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/ServerStatsCollector.cs @@ -147,13 +147,13 @@ namespace OpenSim.Framework.Monitoring RegisteredStats.Add(tempName, tempStat); MakeStat("TotalProcessorTime", null, "sec", ContainerProcessor, - (s) => { s.Value = Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds; }); + (s) => { s.Value = Math.Round(Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds, 3); }); MakeStat("UserProcessorTime", null, "sec", ContainerProcessor, - (s) => { s.Value = Process.GetCurrentProcess().UserProcessorTime.TotalSeconds; }); + (s) => { s.Value = Math.Round(Process.GetCurrentProcess().UserProcessorTime.TotalSeconds, 3); }); MakeStat("PrivilegedProcessorTime", null, "sec", ContainerProcessor, - (s) => { s.Value = Process.GetCurrentProcess().PrivilegedProcessorTime.TotalSeconds; }); + (s) => { s.Value = Math.Round(Process.GetCurrentProcess().PrivilegedProcessorTime.TotalSeconds, 3); }); MakeStat("Threads", null, "threads", ContainerProcessor, (s) => { s.Value = Process.GetCurrentProcess().Threads.Count; }); @@ -262,7 +262,7 @@ namespace OpenSim.Framework.Monitoring { try { - stat.Value = perfControl.perfCounter.NextValue(); + stat.Value = Math.Round(perfControl.perfCounter.NextValue(), 3); } catch (Exception e) { -- cgit v1.1