diff options
author | Melanie | 2013-01-25 00:10:32 +0000 |
---|---|---|
committer | Melanie | 2013-01-25 00:10:32 +0000 |
commit | 0b8bf69470aa461ac8b6554dce5e56427f39ac74 (patch) | |
tree | 9e2175c461425d1abc6ffbdb7d19278a9bf82c2e /OpenSim/Region/UserStatistics/Default_Report.cs | |
parent | Merge branch 'avination' into careminster (diff) | |
parent | BulletSim: reduce the zeroing threshold for rotational velocity. (diff) | |
download | opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.zip opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.tar.gz opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.tar.bz2 opensim-SC-0b8bf69470aa461ac8b6554dce5e56427f39ac74.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
Diffstat (limited to 'OpenSim/Region/UserStatistics/Default_Report.cs')
-rw-r--r-- | OpenSim/Region/UserStatistics/Default_Report.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/UserStatistics/Default_Report.cs b/OpenSim/Region/UserStatistics/Default_Report.cs index cdc615c..fabe3d4 100644 --- a/OpenSim/Region/UserStatistics/Default_Report.cs +++ b/OpenSim/Region/UserStatistics/Default_Report.cs | |||
@@ -32,6 +32,7 @@ using System.Reflection; | |||
32 | using System.Text; | 32 | using System.Text; |
33 | using Mono.Data.SqliteClient; | 33 | using Mono.Data.SqliteClient; |
34 | using OpenMetaverse; | 34 | using OpenMetaverse; |
35 | using OpenMetaverse.StructuredData; | ||
35 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
36 | using OpenSim.Framework.Monitoring; | 37 | using OpenSim.Framework.Monitoring; |
37 | 38 | ||
@@ -230,6 +231,31 @@ TD.align_top { vertical-align: top; } | |||
230 | return returnstruct; | 231 | return returnstruct; |
231 | } | 232 | } |
232 | 233 | ||
234 | /// <summary> | ||
235 | /// Return summar information in the form: | ||
236 | /// <pre> | ||
237 | /// {"totalUsers": "34", | ||
238 | /// "totalSessions": "233", | ||
239 | /// ... | ||
240 | /// } | ||
241 | /// </pre> | ||
242 | /// </summary> | ||
243 | /// <param name="pModelResult"></param> | ||
244 | /// <returns></returns> | ||
245 | public string RenderJson(Hashtable pModelResult) { | ||
246 | stats_default_page_values values = (stats_default_page_values) pModelResult["hdata"]; | ||
247 | |||
248 | OSDMap summaryInfo = new OSDMap(); | ||
249 | summaryInfo.Add("totalUsers", new OSDString(values.total_num_users.ToString())); | ||
250 | summaryInfo.Add("totalSessions", new OSDString(values.total_num_sessions.ToString())); | ||
251 | summaryInfo.Add("averageClientFPS", new OSDString(values.avg_client_fps.ToString())); | ||
252 | summaryInfo.Add("averageClientMem", new OSDString(values.avg_client_mem_use.ToString())); | ||
253 | summaryInfo.Add("averageSimFPS", new OSDString(values.avg_sim_fps.ToString())); | ||
254 | summaryInfo.Add("averagePingTime", new OSDString(values.avg_ping.ToString())); | ||
255 | summaryInfo.Add("totalKBOut", new OSDString(values.total_kb_out.ToString())); | ||
256 | summaryInfo.Add("totalKBIn", new OSDString(values.total_kb_in.ToString())); | ||
257 | return summaryInfo.ToString(); | ||
258 | } | ||
233 | } | 259 | } |
234 | 260 | ||
235 | public struct stats_default_page_values | 261 | public struct stats_default_page_values |
@@ -247,4 +273,5 @@ TD.align_top { vertical-align: top; } | |||
247 | public Dictionary<UUID, USimStatsData> sim_stat_data; | 273 | public Dictionary<UUID, USimStatsData> sim_stat_data; |
248 | public Dictionary<string, IStatsController> stats_reports; | 274 | public Dictionary<string, IStatsController> stats_reports; |
249 | } | 275 | } |
276 | |||
250 | } | 277 | } |