diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs index fabe3d4..fcc7cee 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Region.UserStatistics | |||
61 | Hashtable nh = new Hashtable(); | 61 | Hashtable nh = new Hashtable(); |
62 | nh.Add("hdata", mData); | 62 | nh.Add("hdata", mData); |
63 | nh.Add("Reports", pParams["Reports"]); | 63 | nh.Add("Reports", pParams["Reports"]); |
64 | 64 | ||
65 | return nh; | 65 | return nh; |
66 | } | 66 | } |
67 | 67 | ||
@@ -76,7 +76,7 @@ namespace OpenSim.Region.UserStatistics | |||
76 | public string rep_Default_report_view(stats_default_page_values values) | 76 | public string rep_Default_report_view(stats_default_page_values values) |
77 | { | 77 | { |
78 | 78 | ||
79 | 79 | ||
80 | StringBuilder output = new StringBuilder(); | 80 | StringBuilder output = new StringBuilder(); |
81 | 81 | ||
82 | 82 | ||
@@ -105,7 +105,7 @@ TD.align_top { vertical-align: top; } | |||
105 | </STYLE> | 105 | </STYLE> |
106 | "; | 106 | "; |
107 | HTMLUtil.HtmlHeaders_O(ref output); | 107 | HTMLUtil.HtmlHeaders_O(ref output); |
108 | 108 | ||
109 | HTMLUtil.InsertProtoTypeAJAX(ref output); | 109 | HTMLUtil.InsertProtoTypeAJAX(ref output); |
110 | string[] ajaxUpdaterDivs = new string[3]; | 110 | string[] ajaxUpdaterDivs = new string[3]; |
111 | int[] ajaxUpdaterSeconds = new int[3]; | 111 | int[] ajaxUpdaterSeconds = new int[3]; |
@@ -124,7 +124,7 @@ TD.align_top { vertical-align: top; } | |||
124 | ajaxUpdaterReportFragments[2] = "activelogajax.html"; | 124 | ajaxUpdaterReportFragments[2] = "activelogajax.html"; |
125 | 125 | ||
126 | HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments); | 126 | HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments); |
127 | 127 | ||
128 | output.Append(STYLESHEET); | 128 | output.Append(STYLESHEET); |
129 | HTMLUtil.HtmlHeaders_C(ref output); | 129 | HTMLUtil.HtmlHeaders_C(ref output); |
130 | HTMLUtil.AddReportLinks(ref output, values.stats_reports, ""); | 130 | HTMLUtil.AddReportLinks(ref output, values.stats_reports, ""); |
@@ -200,7 +200,7 @@ TD.align_top { vertical-align: top; } | |||
200 | return output.ToString(); | 200 | return output.ToString(); |
201 | } | 201 | } |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List<Scene> m_scene) | 205 | public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List<Scene> m_scene) |
206 | { | 206 | { |
@@ -208,8 +208,8 @@ TD.align_top { vertical-align: top; } | |||
208 | returnstruct.all_scenes = m_scene.ToArray(); | 208 | returnstruct.all_scenes = m_scene.ToArray(); |
209 | lock (db) | 209 | lock (db) |
210 | { | 210 | { |
211 | string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps, | 211 | string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps, |
212 | AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb, | 212 | AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb, |
213 | SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use | 213 | SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use |
214 | FROM stats_session_data;"; | 214 | FROM stats_session_data;"; |
215 | SqliteCommand cmd = new SqliteCommand(SQL, db); | 215 | SqliteCommand cmd = new SqliteCommand(SQL, db); |
@@ -227,7 +227,10 @@ TD.align_top { vertical-align: top; } | |||
227 | returnstruct.avg_client_mem_use = Convert.ToSingle(sdr["sav_mem_use"]); | 227 | returnstruct.avg_client_mem_use = Convert.ToSingle(sdr["sav_mem_use"]); |
228 | 228 | ||
229 | } | 229 | } |
230 | sdr.Close(); | ||
231 | cmd.Dispose(); | ||
230 | } | 232 | } |
233 | |||
231 | return returnstruct; | 234 | return returnstruct; |
232 | } | 235 | } |
233 | 236 | ||
@@ -273,5 +276,5 @@ TD.align_top { vertical-align: top; } | |||
273 | public Dictionary<UUID, USimStatsData> sim_stat_data; | 276 | public Dictionary<UUID, USimStatsData> sim_stat_data; |
274 | public Dictionary<string, IStatsController> stats_reports; | 277 | public Dictionary<string, IStatsController> stats_reports; |
275 | } | 278 | } |
276 | 279 | ||
277 | } | 280 | } |