aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs36
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
index bd5289f..c15b194 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.UserStatistics
57 { 57 {
58 private static readonly ILog m_log = 58 private static readonly ILog m_log =
59 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 59 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 60
61 private static SqliteConnection dbConn; 61 private static SqliteConnection dbConn;
62 62
63 /// <summary> 63 /// <summary>
@@ -67,7 +67,7 @@ namespace OpenSim.Region.UserStatistics
67 67
68 private List<Scene> m_scenes = new List<Scene>(); 68 private List<Scene> m_scenes = new List<Scene>();
69 private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>(); 69 private Dictionary<string, IStatsController> reports = new Dictionary<string, IStatsController>();
70 private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>(); 70 private Dictionary<UUID, USimStatsData> m_simstatsCounters = new Dictionary<UUID, USimStatsData>();
71 private const int updateStatsMod = 6; 71 private const int updateStatsMod = 6;
72 private int updateLogMod = 1; 72 private int updateLogMod = 1;
73 private volatile int updateLogCounter = 0; 73 private volatile int updateLogCounter = 0;
@@ -217,7 +217,7 @@ namespace OpenSim.Region.UserStatistics
217 { 217 {
218 m_loglines = readLogLines(10); 218 m_loglines = readLogLines(10);
219 219
220 if (updateLogCounter > 10000) 220 if (updateLogCounter > 10000)
221 updateLogCounter = 1; 221 updateLogCounter = 1;
222 } 222 }
223 223
@@ -228,12 +228,12 @@ namespace OpenSim.Region.UserStatistics
228 ss.ConsumeSimStats(stats); 228 ss.ConsumeSimStats(stats);
229 } 229 }
230 } 230 }
231 } 231 }
232 catch (KeyNotFoundException) 232 catch (KeyNotFoundException)
233 { 233 {
234 } 234 }
235 } 235 }
236 236
237 private Hashtable HandleUnknownCAPSRequest(Hashtable request) 237 private Hashtable HandleUnknownCAPSRequest(Hashtable request)
238 { 238 {
239 //string regpath = request["uri"].ToString(); 239 //string regpath = request["uri"].ToString();
@@ -257,7 +257,7 @@ namespace OpenSim.Region.UserStatistics
257 int response_code = 404; 257 int response_code = 404;
258 string contenttype = "text/html"; 258 string contenttype = "text/html";
259 bool jsonFormatOutput = false; 259 bool jsonFormatOutput = false;
260 260
261 string strOut = string.Empty; 261 string strOut = string.Empty;
262 262
263 // The request patch should be "/SStats/reportName" where 'reportName' 263 // The request patch should be "/SStats/reportName" where 'reportName'
@@ -288,15 +288,15 @@ namespace OpenSim.Region.UserStatistics
288 repParams["SimStats"] = m_simstatsCounters; 288 repParams["SimStats"] = m_simstatsCounters;
289 repParams["LogLines"] = m_loglines; 289 repParams["LogLines"] = m_loglines;
290 repParams["Reports"] = reports; 290 repParams["Reports"] = reports;
291 291
292 concurrencyCounter++; 292 concurrencyCounter++;
293 293
294 if (jsonFormatOutput) 294 if (jsonFormatOutput)
295 { 295 {
296 strOut = rep.RenderJson(rep.ProcessModel(repParams)); 296 strOut = rep.RenderJson(rep.ProcessModel(repParams));
297 contenttype = "text/json"; 297 contenttype = "text/json";
298 } 298 }
299 else 299 else
300 { 300 {
301 strOut = rep.RenderView(rep.ProcessModel(repParams)); 301 strOut = rep.RenderView(rep.ProcessModel(repParams));
302 } 302 }
@@ -312,7 +312,7 @@ namespace OpenSim.Region.UserStatistics
312 } 312 }
313 313
314 concurrencyCounter--; 314 concurrencyCounter--;
315 315
316 response_code = 200; 316 response_code = 200;
317 } 317 }
318 else 318 else
@@ -463,7 +463,7 @@ namespace OpenSim.Region.UserStatistics
463 UUID agentID, Caps caps) 463 UUID agentID, Caps caps)
464 { 464 {
465// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID); 465// m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID);
466 466
467 UpdateUserStats(ParseViewerStats(request, agentID), dbConn); 467 UpdateUserStats(ParseViewerStats(request, agentID), dbConn);
468 468
469 return String.Empty; 469 return String.Empty;
@@ -525,7 +525,7 @@ namespace OpenSim.Region.UserStatistics
525 } 525 }
526 } 526 }
527 } 527 }
528 528
529 usd = uid.session_data; 529 usd = uid.session_data;
530 530
531 if (message.Type != OSDType.Map) 531 if (message.Type != OSDType.Map)
@@ -747,16 +747,16 @@ namespace OpenSim.Region.UserStatistics
747 );"; 747 );";
748 748
749 private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data ( 749 private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data (
750session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view, 750session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view,
751mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping, 751mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping,
752regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram, 752regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram,
753d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit, 753d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit,
754f_resent, f_send_packet 754f_resent, f_send_packet
755) 755)
756VALUES 756VALUES
757( 757(
758:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view, 758:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view,
759:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping, 759:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping,
760:regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram, 760:regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram,
761:d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit, 761:d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit,
762:f_resent, :f_send_packet 762:f_resent, :f_send_packet
@@ -980,7 +980,7 @@ VALUES
980 980
981 if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1) 981 if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1)
982 return 0; 982 return 0;
983 983
984 float freqtest = (float)freq.Length / freq.Rank; 984 float freqtest = (float)freq.Length / freq.Rank;
985 985
986 for (i = 0; i < freqtest; i++) 986 for (i = 0; i < freqtest; i++)
@@ -1116,7 +1116,7 @@ VALUES
1116 public List<float> _sim_fps; 1116 public List<float> _sim_fps;
1117 public List<int> _agents_in_view; 1117 public List<int> _agents_in_view;
1118 } 1118 }
1119 1119
1120 #endregion 1120 #endregion
1121 1121
1122 public class USimStatsData 1122 public class USimStatsData