diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Monitoring/StatsManager.cs | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs index 910907e..24db6d4 100644 --- a/OpenSim/Framework/Monitoring/StatsManager.cs +++ b/OpenSim/Framework/Monitoring/StatsManager.cs | |||
@@ -85,6 +85,7 @@ namespace OpenSim.Framework.Monitoring | |||
85 | if (cmd.Length > 2) | 85 | if (cmd.Length > 2) |
86 | { | 86 | { |
87 | var categoryName = cmd[2]; | 87 | var categoryName = cmd[2]; |
88 | var containerName = cmd.Length > 3 ? cmd[3] : String.Empty; | ||
88 | 89 | ||
89 | if (categoryName == AllSubCommand) | 90 | if (categoryName == AllSubCommand) |
90 | { | 91 | { |
@@ -108,7 +109,20 @@ namespace OpenSim.Framework.Monitoring | |||
108 | } | 109 | } |
109 | else | 110 | else |
110 | { | 111 | { |
111 | OutputCategoryStatsToConsole(con, category); | 112 | if (String.IsNullOrEmpty(containerName)) |
113 | OutputCategoryStatsToConsole(con, category); | ||
114 | else | ||
115 | { | ||
116 | SortedDictionary<string, Stat> container; | ||
117 | if (category.TryGetValue(containerName, out container)) | ||
118 | { | ||
119 | OutputContainerStatsToConsole(con, container); | ||
120 | } | ||
121 | else | ||
122 | { | ||
123 | con.OutputFormat("No such container {0} in category {1}", containerName, categoryName); | ||
124 | } | ||
125 | } | ||
112 | } | 126 | } |
113 | } | 127 | } |
114 | } | 128 | } |
@@ -124,10 +138,15 @@ namespace OpenSim.Framework.Monitoring | |||
124 | { | 138 | { |
125 | foreach (var container in category.Values) | 139 | foreach (var container in category.Values) |
126 | { | 140 | { |
127 | foreach (Stat stat in container.Values) | 141 | OutputContainerStatsToConsole(con, container); |
128 | { | 142 | } |
129 | con.Output(stat.ToConsoleString()); | 143 | } |
130 | } | 144 | |
145 | private static void OutputContainerStatsToConsole( ICommandConsole con, SortedDictionary<string, Stat> container) | ||
146 | { | ||
147 | foreach (Stat stat in container.Values) | ||
148 | { | ||
149 | con.Output(stat.ToConsoleString()); | ||
131 | } | 150 | } |
132 | } | 151 | } |
133 | 152 | ||