diff options
author | Justin Clark-Casey (justincc) | 2012-10-11 23:28:53 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-11 23:28:53 +0100 |
commit | 1f2472d0fcd86a7ae09c01ecb3508eab001ce033 (patch) | |
tree | 2668a8dc7ede987d1b104292508c311c03a37e59 /OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs | |
parent | Assign endVector before control leaves ObjectCommandsModule.TryParseVectorRan... (diff) | |
download | opensim-SC_OLD-1f2472d0fcd86a7ae09c01ecb3508eab001ce033.zip opensim-SC_OLD-1f2472d0fcd86a7ae09c01ecb3508eab001ce033.tar.gz opensim-SC_OLD-1f2472d0fcd86a7ae09c01ecb3508eab001ce033.tar.bz2 opensim-SC_OLD-1f2472d0fcd86a7ae09c01ecb3508eab001ce033.tar.xz |
Extend "show stats" command to "show stats [list|all|<category name>]"
This allows different categories of stats to be shown, with options to list categories or show all stats.
Currently categories are scene and simulator and only a very few stats are currently registered via this mechanism.
This commit also adds percentage stats for packets and blocks reused from the packet pool.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs index 8ac9090..aa86202 100644 --- a/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs +++ b/OpenSim/Framework/Monitoring/SimExtraStatsCollector.cs | |||
@@ -359,13 +359,19 @@ Asset service request failures: {3}" + Environment.NewLine, | |||
359 | inPacketsPerSecond, outPacketsPerSecond, pendingDownloads, pendingUploads, unackedBytes, totalFrameTime, | 359 | inPacketsPerSecond, outPacketsPerSecond, pendingDownloads, pendingUploads, unackedBytes, totalFrameTime, |
360 | netFrameTime, physicsFrameTime, otherFrameTime, agentFrameTime, imageFrameTime)); | 360 | netFrameTime, physicsFrameTime, otherFrameTime, agentFrameTime, imageFrameTime)); |
361 | 361 | ||
362 | foreach (KeyValuePair<string, Stat> kvp in StatsManager.RegisteredStats) | 362 | Dictionary<string, Dictionary<string, Stat>> sceneStats; |
363 | { | ||
364 | Stat stat = kvp.Value; | ||
365 | 363 | ||
366 | if (stat.Category == "scene" && stat.Verbosity == StatVerbosity.Info) | 364 | if (StatsManager.TryGetStats("scene", out sceneStats)) |
365 | { | ||
366 | foreach (KeyValuePair<string, Dictionary<string, Stat>> kvp in sceneStats) | ||
367 | { | 367 | { |
368 | sb.AppendFormat("Slow frames ({0}): {1}\n", stat.Container, stat.Value); | 368 | foreach (Stat stat in kvp.Value.Values) |
369 | { | ||
370 | if (stat.Verbosity == StatVerbosity.Info) | ||
371 | { | ||
372 | sb.AppendFormat("{0} ({1}): {2}{3}\n", stat.Name, stat.Container, stat.Value, stat.UnitName); | ||
373 | } | ||
374 | } | ||
369 | } | 375 | } |
370 | } | 376 | } |
371 | 377 | ||