aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Monitoring/StatsManager.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-06-17 22:39:00 +0100
committerJustin Clark-Casey (justincc)2013-06-17 22:39:00 +0100
commit0d2fd0d914581f755661455b8db2b9e399154632 (patch)
treeb3c8f5634d946d8e623f761eb7001f254d2af9be /OpenSim/Framework/Monitoring/StatsManager.cs
parentcorrect method doc for llRot2Axis() (diff)
downloadopensim-SC-0d2fd0d914581f755661455b8db2b9e399154632.zip
opensim-SC-0d2fd0d914581f755661455b8db2b9e399154632.tar.gz
opensim-SC-0d2fd0d914581f755661455b8db2b9e399154632.tar.bz2
opensim-SC-0d2fd0d914581f755661455b8db2b9e399154632.tar.xz
Make general server stats available on the robust console as well as the simulator console
This means the "show stats" command is now active on the robust console.
Diffstat (limited to 'OpenSim/Framework/Monitoring/StatsManager.cs')
-rw-r--r--OpenSim/Framework/Monitoring/StatsManager.cs72
1 files changed, 40 insertions, 32 deletions
diff --git a/OpenSim/Framework/Monitoring/StatsManager.cs b/OpenSim/Framework/Monitoring/StatsManager.cs
index 24db6d4..3aee984 100644
--- a/OpenSim/Framework/Monitoring/StatsManager.cs
+++ b/OpenSim/Framework/Monitoring/StatsManager.cs
@@ -54,13 +54,13 @@ namespace OpenSim.Framework.Monitoring
54 public static SortedDictionary<string, SortedDictionary<string, SortedDictionary<string, Stat>>> RegisteredStats 54 public static SortedDictionary<string, SortedDictionary<string, SortedDictionary<string, Stat>>> RegisteredStats
55 = new SortedDictionary<string, SortedDictionary<string, SortedDictionary<string, Stat>>>(); 55 = new SortedDictionary<string, SortedDictionary<string, SortedDictionary<string, Stat>>>();
56 56
57 private static AssetStatsCollector assetStats; 57// private static AssetStatsCollector assetStats;
58 private static UserStatsCollector userStats; 58// private static UserStatsCollector userStats;
59 private static SimExtraStatsCollector simExtraStats = new SimExtraStatsCollector(); 59// private static SimExtraStatsCollector simExtraStats = new SimExtraStatsCollector();
60 60
61 public static AssetStatsCollector AssetStats { get { return assetStats; } } 61// public static AssetStatsCollector AssetStats { get { return assetStats; } }
62 public static UserStatsCollector UserStats { get { return userStats; } } 62// public static UserStatsCollector UserStats { get { return userStats; } }
63 public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } 63 public static SimExtraStatsCollector SimExtraStats { get; set; }
64 64
65 public static void RegisterConsoleCommands(ICommandConsole console) 65 public static void RegisterConsoleCommands(ICommandConsole console)
66 { 66 {
@@ -89,10 +89,7 @@ namespace OpenSim.Framework.Monitoring
89 89
90 if (categoryName == AllSubCommand) 90 if (categoryName == AllSubCommand)
91 { 91 {
92 foreach (var category in RegisteredStats.Values) 92 OutputAllStatsToConsole(con);
93 {
94 OutputCategoryStatsToConsole(con, category);
95 }
96 } 93 }
97 else if (categoryName == ListSubCommand) 94 else if (categoryName == ListSubCommand)
98 { 95 {
@@ -129,7 +126,18 @@ namespace OpenSim.Framework.Monitoring
129 else 126 else
130 { 127 {
131 // Legacy 128 // Legacy
132 con.Output(SimExtraStats.Report()); 129 if (SimExtraStats != null)
130 con.Output(SimExtraStats.Report());
131 else
132 OutputAllStatsToConsole(con);
133 }
134 }
135
136 private static void OutputAllStatsToConsole(ICommandConsole con)
137 {
138 foreach (var category in RegisteredStats.Values)
139 {
140 OutputCategoryStatsToConsole(con, category);
133 } 141 }
134 } 142 }
135 143
@@ -150,27 +158,27 @@ namespace OpenSim.Framework.Monitoring
150 } 158 }
151 } 159 }
152 160
153 /// <summary> 161// /// <summary>
154 /// Start collecting statistics related to assets. 162// /// Start collecting statistics related to assets.
155 /// Should only be called once. 163// /// Should only be called once.
156 /// </summary> 164// /// </summary>
157 public static AssetStatsCollector StartCollectingAssetStats() 165// public static AssetStatsCollector StartCollectingAssetStats()
158 { 166// {
159 assetStats = new AssetStatsCollector(); 167// assetStats = new AssetStatsCollector();
160 168//
161 return assetStats; 169// return assetStats;
162 } 170// }
163 171//
164 /// <summary> 172// /// <summary>
165 /// Start collecting statistics related to users. 173// /// Start collecting statistics related to users.
166 /// Should only be called once. 174// /// Should only be called once.
167 /// </summary> 175// /// </summary>
168 public static UserStatsCollector StartCollectingUserStats() 176// public static UserStatsCollector StartCollectingUserStats()
169 { 177// {
170 userStats = new UserStatsCollector(); 178// userStats = new UserStatsCollector();
171 179//
172 return userStats; 180// return userStats;
173 } 181// }
174 182
175 /// <summary> 183 /// <summary>
176 /// Registers a statistic. 184 /// Registers a statistic.