mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
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)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user