aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/StatsManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-06-20 00:00:39 +0100
committerJustin Clark-Casey (justincc)2013-06-20 00:00:39 +0100
commit086fd70a5fdfd9b3a0e56201596f6d6bb20f391e (patch)
treeff230f73060ae70ca24f49e716a97267a11d88e2 /OpenSim/Framework/Monitoring/StatsManager.cs
parentDisplay existing statistic of how many http requests a server is making as se... (diff)
downloadopensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.zip
opensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.tar.gz
opensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.tar.bz2
opensim-SC_OLD-086fd70a5fdfd9b3a0e56201596f6d6bb20f391e.tar.xz
Make it possible to specify display of stats in a particular 'container' by separating category and container with a period.
e.g. "show stats server.network" I failed to realize this had already been implemented without the period in the show stats command (as the command help had not been updated). However, I would prefer the . approach as it will allow specifying multiple stats, easier wildcarding, etc. This commit also prevents any stat from having a period in its short name.
Diffstat (limited to 'OpenSim/Framework/Monitoring/StatsManager.cs')
-rw-r--r--OpenSim/Framework/Monitoring/StatsManager.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 3aee984..af9f5ba 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -68,12 +68,13 @@ namespace OpenSim.Framework.Monitoring
68 "General", 68 "General",
69 false, 69 false,
70 "show stats", 70 "show stats",
71 "show stats [list|all|<category>]", 71 "show stats [list|all|<category>[.<container>]",
72 "Show statistical information for this server", 72 "Show statistical information for this server",
73 "If no final argument is specified then legacy statistics information is currently shown.\n" 73 "If no final argument is specified then legacy statistics information is currently shown.\n"
74 + "If list is specified then statistic categories are shown.\n" 74 + "If list is specified then statistic categories are shown.\n"
75 + "If all is specified then all registered statistics are shown.\n" 75 + "If all is specified then all registered statistics are shown.\n"
76 + "If a category name is specified then only statistics from that category are shown.\n" 76 + "If a category name is specified then only statistics from that category are shown.\n"
77 + "If a category container is also specified then only statistics from that category in that container are shown.\n"
77 + "THIS STATS FACILITY IS EXPERIMENTAL AND DOES NOT YET CONTAIN ALL STATS", 78 + "THIS STATS FACILITY IS EXPERIMENTAL AND DOES NOT YET CONTAIN ALL STATS",
78 HandleShowStatsCommand); 79 HandleShowStatsCommand);
79 } 80 }
@@ -84,8 +85,11 @@ namespace OpenSim.Framework.Monitoring
84 85
85 if (cmd.Length > 2) 86 if (cmd.Length > 2)
86 { 87 {
87 var categoryName = cmd[2]; 88 string name = cmd[2];
88 var containerName = cmd.Length > 3 ? cmd[3] : String.Empty; 89 string[] components = name.Split('.');
90
91 string categoryName = components[0];
92 string containerName = components.Length > 1 ? components[1] : null;
89 93
90 if (categoryName == AllSubCommand) 94 if (categoryName == AllSubCommand)
91 { 95 {
@@ -107,7 +111,9 @@ namespace OpenSim.Framework.Monitoring
107 else 111 else
108 { 112 {
109 if (String.IsNullOrEmpty(containerName)) 113 if (String.IsNullOrEmpty(containerName))
114 {
110 OutputCategoryStatsToConsole(con, category); 115 OutputCategoryStatsToConsole(con, category);
116 }
111 else 117 else
112 { 118 {
113 SortedDictionary<string, Stat> container; 119 SortedDictionary<string, Stat> container;