aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorTeravus Ovares2009-01-03 03:30:03 +0000
committerTeravus Ovares2009-01-03 03:30:03 +0000
commite9cef70f892bfbf4aad0e4471a958367766d849a (patch)
tree397e078977b430526a2f04041e0dfb9a5fb99156 /OpenSim/Region/Environment/Scenes/Scene.cs
parentSplit agent updates into two messages: full update and position+camera update... (diff)
downloadopensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.zip
opensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.tar.gz
opensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.tar.bz2
opensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.tar.xz
* Updates the sim stats module. Cleans out some of the rot.
* Adds a prototype web stats module which is disabled by default. It's functional with one report right now, however, the database structure may change, so I don't recommend enabling this to keep actual stats right now. I'll let you know when it's safe. * Adds Prototype for ajaxy web content * removed a warning or two.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs78
1 files changed, 39 insertions, 39 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 408f100..daeb186 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -69,7 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
69 69
70 protected Timer m_restartWaitTimer = new Timer(); 70 protected Timer m_restartWaitTimer = new Timer();
71 71
72 protected SimStatsReporter m_statsReporter; 72 public SimStatsReporter StatsReporter;
73 73
74 protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>(); 74 protected List<RegionInfo> m_regionRestartNotifyList = new List<RegionInfo>();
75 protected List<RegionInfo> m_neighbours = new List<RegionInfo>(); 75 protected List<RegionInfo> m_neighbours = new List<RegionInfo>();
@@ -244,7 +244,7 @@ namespace OpenSim.Region.Environment.Scenes
244 /// </summary> 244 /// </summary>
245 public float SimulatorFPS 245 public float SimulatorFPS
246 { 246 {
247 get { return m_statsReporter.getLastReportedSimFPS(); } 247 get { return StatsReporter.getLastReportedSimFPS(); }
248 } 248 }
249 249
250 public int TimePhase 250 public int TimePhase
@@ -358,10 +358,10 @@ namespace OpenSim.Region.Environment.Scenes
358 358
359 m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics; 359 m_physics_enabled = !RegionInfo.RegionSettings.DisablePhysics;
360 360
361 m_statsReporter = new SimStatsReporter(this); 361 StatsReporter = new SimStatsReporter(this);
362 m_statsReporter.OnSendStatsResult += SendSimStatsPackets; 362 StatsReporter.OnSendStatsResult += SendSimStatsPackets;
363 363
364 m_statsReporter.SetObjectCapacity(objectCapacity); 364 StatsReporter.SetObjectCapacity(objectCapacity);
365 365
366 m_simulatorVersion = simulatorVersion 366 m_simulatorVersion = simulatorVersion
367 + " (OS " + Util.GetOperatingSystemInformation() + ")" 367 + " (OS " + Util.GetOperatingSystemInformation() + ")"
@@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Scenes
814 if (m_update_entities == 1) 814 if (m_update_entities == 1)
815 { 815 {
816 m_update_entities = 5; 816 m_update_entities = 5;
817 m_statsReporter.SetUpdateMS(6000); 817 StatsReporter.SetUpdateMS(6000);
818 } 818 }
819 } 819 }
820 else 820 else
@@ -822,7 +822,7 @@ namespace OpenSim.Region.Environment.Scenes
822 if (m_update_entities == 5) 822 if (m_update_entities == 5)
823 { 823 {
824 m_update_entities = 1; 824 m_update_entities = 1;
825 m_statsReporter.SetUpdateMS(3000); 825 StatsReporter.SetUpdateMS(3000);
826 } 826 }
827 } 827 }
828 828
@@ -891,20 +891,20 @@ namespace OpenSim.Region.Environment.Scenes
891 otherMS = System.Environment.TickCount - otherMS; 891 otherMS = System.Environment.TickCount - otherMS;
892 // if (m_frame%m_update_avatars == 0) 892 // if (m_frame%m_update_avatars == 0)
893 // UpdateInWorldTime(); 893 // UpdateInWorldTime();
894 m_statsReporter.AddPhysicsFPS(physicsFPS); 894 StatsReporter.AddPhysicsFPS(physicsFPS);
895 m_statsReporter.AddTimeDilation(m_timedilation); 895 StatsReporter.AddTimeDilation(m_timedilation);
896 m_statsReporter.AddFPS(1); 896 StatsReporter.AddFPS(1);
897 m_statsReporter.AddInPackets(0); 897 StatsReporter.AddInPackets(0);
898 m_statsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount()); 898 StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
899 m_statsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount()); 899 StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
900 m_statsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount()); 900 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
901 m_statsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount()); 901 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
902 frameMS = System.Environment.TickCount - frameMS; 902 frameMS = System.Environment.TickCount - frameMS;
903 m_statsReporter.addFrameMS(frameMS); 903 StatsReporter.addFrameMS(frameMS);
904 m_statsReporter.addPhysicsMS(physicsMS); 904 StatsReporter.addPhysicsMS(physicsMS);
905 m_statsReporter.addOtherMS(otherMS); 905 StatsReporter.addOtherMS(otherMS);
906 m_statsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); 906 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
907 m_statsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); 907 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
908 } 908 }
909 } 909 }
910 catch (NotImplementedException) 910 catch (NotImplementedException)
@@ -2380,8 +2380,8 @@ namespace OpenSim.Region.Environment.Scenes
2380 2380
2381 client.OnObjectOwner += ObjectOwner; 2381 client.OnObjectOwner += ObjectOwner;
2382 2382
2383 if (m_statsReporter != null) 2383 if (StatsReporter != null)
2384 client.OnNetworkStatsUpdate += m_statsReporter.AddPacketsFromClientStats; 2384 client.OnNetworkStatsUpdate += StatsReporter.AddPacketsFromClientStats;
2385 2385
2386 // EventManager.TriggerOnNewClient(client); 2386 // EventManager.TriggerOnNewClient(client);
2387 } 2387 }
@@ -3027,14 +3027,14 @@ namespace OpenSim.Region.Environment.Scenes
3027 if (presence != null) 3027 if (presence != null)
3028 { 3028 {
3029 // Nothing is removed here, so down count it as such 3029 // Nothing is removed here, so down count it as such
3030 // if (presence.IsChildAgent) 3030 if (presence.IsChildAgent)
3031 // { 3031 {
3032 // m_sceneGraph.removeUserCount(false); 3032 m_sceneGraph.removeUserCount(false);
3033 // } 3033 }
3034 // else 3034 else
3035 // { 3035 {
3036 // m_sceneGraph.removeUserCount(true); 3036 m_sceneGraph.removeUserCount(true);
3037 // } 3037 }
3038 3038
3039 // Don't do this to root agents on logout, it's not nice for the viewer 3039 // Don't do this to root agents on logout, it's not nice for the viewer
3040 if (presence.IsChildAgent) 3040 if (presence.IsChildAgent)
@@ -3322,9 +3322,9 @@ namespace OpenSim.Region.Environment.Scenes
3322 if (RegionInfo.ObjectCapacity != 0) 3322 if (RegionInfo.ObjectCapacity != 0)
3323 objects = RegionInfo.ObjectCapacity; 3323 objects = RegionInfo.ObjectCapacity;
3324 3324
3325 if (m_statsReporter != null) 3325 if (StatsReporter != null)
3326 { 3326 {
3327 m_statsReporter.SetObjectCapacity(objects); 3327 StatsReporter.SetObjectCapacity(objects);
3328 } 3328 }
3329 objectCapacity = objects; 3329 objectCapacity = objects;
3330 } 3330 }
@@ -3430,25 +3430,25 @@ namespace OpenSim.Region.Environment.Scenes
3430 3430
3431 public void AddPacketStats(int inPackets, int outPackets, int unAckedBytes) 3431 public void AddPacketStats(int inPackets, int outPackets, int unAckedBytes)
3432 { 3432 {
3433 m_statsReporter.AddInPackets(inPackets); 3433 StatsReporter.AddInPackets(inPackets);
3434 m_statsReporter.AddOutPackets(outPackets); 3434 StatsReporter.AddOutPackets(outPackets);
3435 m_statsReporter.AddunAckedBytes(unAckedBytes); 3435 StatsReporter.AddunAckedBytes(unAckedBytes);
3436 } 3436 }
3437 3437
3438 public void AddAgentTime(int ms) 3438 public void AddAgentTime(int ms)
3439 { 3439 {
3440 m_statsReporter.addFrameMS(ms); 3440 StatsReporter.addFrameMS(ms);
3441 m_statsReporter.addAgentMS(ms); 3441 StatsReporter.addAgentMS(ms);
3442 } 3442 }
3443 3443
3444 public void AddAgentUpdates(int count) 3444 public void AddAgentUpdates(int count)
3445 { 3445 {
3446 m_statsReporter.AddAgentUpdates(count); 3446 StatsReporter.AddAgentUpdates(count);
3447 } 3447 }
3448 3448
3449 public void AddPendingDownloads(int count) 3449 public void AddPendingDownloads(int count)
3450 { 3450 {
3451 m_statsReporter.addPendingDownload(count); 3451 StatsReporter.addPendingDownload(count);
3452 } 3452 }
3453 3453
3454 #endregion 3454 #endregion