aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-07-21 23:08:15 +0100
committerJustin Clark-Casey2014-08-02 00:57:36 +0100
commitb6e32c000b2d98165c47861e9930fded142fcab6 (patch)
treea200df18ba4d2a164b2a89d7c2b9346c099ccb97
parentFix CPU processor use reporting on Mono. (diff)
downloadopensim-SC-b6e32c000b2d98165c47861e9930fded142fcab6.zip
opensim-SC-b6e32c000b2d98165c47861e9930fded142fcab6.tar.gz
opensim-SC-b6e32c000b2d98165c47861e9930fded142fcab6.tar.bz2
opensim-SC-b6e32c000b2d98165c47861e9930fded142fcab6.tar.xz
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)
-rw-r--r--OpenSim/Framework/Monitoring/ServerStatsCollector.cs8
1 files changed, 4 insertions, 4 deletions
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
147 RegisteredStats.Add(tempName, tempStat); 147 RegisteredStats.Add(tempName, tempStat);
148 148
149 MakeStat("TotalProcessorTime", null, "sec", ContainerProcessor, 149 MakeStat("TotalProcessorTime", null, "sec", ContainerProcessor,
150 (s) => { s.Value = Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds; }); 150 (s) => { s.Value = Math.Round(Process.GetCurrentProcess().TotalProcessorTime.TotalSeconds, 3); });
151 151
152 MakeStat("UserProcessorTime", null, "sec", ContainerProcessor, 152 MakeStat("UserProcessorTime", null, "sec", ContainerProcessor,
153 (s) => { s.Value = Process.GetCurrentProcess().UserProcessorTime.TotalSeconds; }); 153 (s) => { s.Value = Math.Round(Process.GetCurrentProcess().UserProcessorTime.TotalSeconds, 3); });
154 154
155 MakeStat("PrivilegedProcessorTime", null, "sec", ContainerProcessor, 155 MakeStat("PrivilegedProcessorTime", null, "sec", ContainerProcessor,
156 (s) => { s.Value = Process.GetCurrentProcess().PrivilegedProcessorTime.TotalSeconds; }); 156 (s) => { s.Value = Math.Round(Process.GetCurrentProcess().PrivilegedProcessorTime.TotalSeconds, 3); });
157 157
158 MakeStat("Threads", null, "threads", ContainerProcessor, 158 MakeStat("Threads", null, "threads", ContainerProcessor,
159 (s) => { s.Value = Process.GetCurrentProcess().Threads.Count; }); 159 (s) => { s.Value = Process.GetCurrentProcess().Threads.Count; });
@@ -262,7 +262,7 @@ namespace OpenSim.Framework.Monitoring
262 { 262 {
263 try 263 try
264 { 264 {
265 stat.Value = perfControl.perfCounter.NextValue(); 265 stat.Value = Math.Round(perfControl.perfCounter.NextValue(), 3);
266 } 266 }
267 catch (Exception e) 267 catch (Exception e)
268 { 268 {