diff options
author | Justin Clark-Casey (justincc) | 2014-07-21 23:08:15 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-07-21 23:08:15 +0100 |
commit | 3355bedaeb26b07b6b91c5de194991acaf2cdf36 (patch) | |
tree | 07078399e1417cbf6e370dfa0b918828b39cc080 /OpenSim | |
parent | Fix CPU processor use reporting on Mono. (diff) | |
download | opensim-SC_OLD-3355bedaeb26b07b6b91c5de194991acaf2cdf36.zip opensim-SC_OLD-3355bedaeb26b07b6b91c5de194991acaf2cdf36.tar.gz opensim-SC_OLD-3355bedaeb26b07b6b91c5de194991acaf2cdf36.tar.bz2 opensim-SC_OLD-3355bedaeb26b07b6b91c5de194991acaf2cdf36.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)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/Monitoring/ServerStatsCollector.cs | 8 |
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 | { |