aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
authorRobert Louden2015-04-21 16:15:48 -0400
committerRobert Louden2015-04-21 16:15:48 -0400
commitc3138f9f38420ae370078df3b0990a953f43b087 (patch)
tree4b89c336bb8f92a3da5c553f87d3c8f4a34c12ed /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
parentMoved over metrics from previous OpenSim 0.8.0.3 repository (this new reposit... (diff)
downloadopensim-SC_OLD-c3138f9f38420ae370078df3b0990a953f43b087.zip
opensim-SC_OLD-c3138f9f38420ae370078df3b0990a953f43b087.tar.gz
opensim-SC_OLD-c3138f9f38420ae370078df3b0990a953f43b087.tar.bz2
opensim-SC_OLD-c3138f9f38420ae370078df3b0990a953f43b087.tar.xz
Phase 2 additons with Frame Dilation metric.
Diffstat (limited to '')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SimStatsReporter.cs52
1 files changed, 27 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index b6da636..07d5f04 100755
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -63,7 +63,7 @@ namespace OpenSim.Region.Framework.Scenes
63 63
64 // Determines the size of the array that is used to collect StatBlocks 64 // Determines the size of the array that is used to collect StatBlocks
65 // for sending to the SimStats and SimExtraStatsCollector 65 // for sending to the SimStats and SimExtraStatsCollector
66 private const int m_statisticArraySize = 26; 66 private const int m_statisticArraySize = 27;
67 67
68 /// <summary> 68 /// <summary>
69 /// These are the IDs of stats sent in the StatsPacket to the viewer. 69 /// These are the IDs of stats sent in the StatsPacket to the viewer.
@@ -109,10 +109,11 @@ namespace OpenSim.Region.Framework.Scenes
109 SimSpareMs = 32, 109 SimSpareMs = 32,
110 SimSleepMs = 33, 110 SimSleepMs = 33,
111 SimIoPumpTime = 34, 111 SimIoPumpTime = 34,
112 UsersLoggingIn = 35, 112 FrameDilation = 35,
113 TotalGeoPrim = 36, 113 UsersLoggingIn = 36,
114 TotalMesh = 37, 114 TotalGeoPrim = 37,
115 ThreadCount = 38 115 TotalMesh = 38,
116 ThreadCount = 39
116 } 117 }
117 118
118 /// <summary> 119 /// <summary>
@@ -348,7 +349,7 @@ namespace OpenSim.Region.Framework.Scenes
348 double simulationSumFrameTime; 349 double simulationSumFrameTime;
349 double physicsSumFrameTime; 350 double physicsSumFrameTime;
350 double networkSumFrameTime; 351 double networkSumFrameTime;
351 float timeDilation; 352 float frameDilation;
352 int currentFrame; 353 int currentFrame;
353 354
354 if (!m_scene.Active) 355 if (!m_scene.Active)
@@ -466,16 +467,14 @@ namespace OpenSim.Region.Framework.Scenes
466 else 467 else
467 currentFrame = m_nextLocation - 1; 468 currentFrame = m_nextLocation - 1;
468 469
469 // Calculate the time dilation; which is currently based on the ratio between the sum of the 470 // Calculate the frame dilation; which is currently based on the ratio between the sum of the
470 // physics and simulation rate, and the set minimum time to run the scene's update; minFrameTime 471 // physics and simulation rate, and the set minimum time to run a scene's frame
471 // is given in seconds so multiply by 1000 to convert it to milliseconds 472 frameDilation = (float)(m_simulationFrameTimeMilliseconds[currentFrame] +
472 timeDilation = (float)(m_simulationFrameTimeMilliseconds[currentFrame] + 473 m_physicsFrameTimeMilliseconds[currentFrame]) / m_scene.MinFrameTicks;
473 m_physicsFrameTimeMilliseconds[currentFrame]) / (m_scene.MinFrameTime * 1000);
474 474
475 // ORIGINAL code commented out until we have time to add our own 475 // ORIGINAL code commented out until we have time to add our own
476 sb[0].StatID = (uint) Stats.TimeDilation; 476 sb[0].StatID = (uint) Stats.TimeDilation;
477 //sb[0].StatValue = (Single.IsNaN(m_timeDilation)) ? 0.1f : m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor)); 477 sb[0].StatValue = (Single.IsNaN(m_timeDilation)) ? 0.1f : m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor));
478 sb[0].StatValue = timeDilation;
479 478
480 sb[1].StatID = (uint) Stats.SimFPS; 479 sb[1].StatID = (uint) Stats.SimFPS;
481 sb[1].StatValue = reportedFPS / m_statsUpdateFactor; 480 sb[1].StatValue = reportedFPS / m_statsUpdateFactor;
@@ -547,23 +546,26 @@ namespace OpenSim.Region.Framework.Scenes
547 sb[21].StatID = (uint)Stats.SimSpareMs; 546 sb[21].StatID = (uint)Stats.SimSpareMs;
548 sb[21].StatValue = m_spareMS / framesUpdated; 547 sb[21].StatValue = m_spareMS / framesUpdated;
549 548
550 // Added to track the number of users currently attempting to 549 // Current ratio between the sum of physics and sim rate, and the
551 // login to the region 550 // minimum time to run a scene's frame
552 sb[22].StatID = (uint)Stats.UsersLoggingIn; 551 sb[22].StatID = (uint)Stats.FrameDilation;
553 sb[22].StatValue = m_usersLoggingIn; 552 sb[22].StatValue = frameDilation;
553
554 // Current number of users currently attemptint to login to region
555 sb[23].StatID = (uint)Stats.UsersLoggingIn;
556 sb[23].StatValue = m_usersLoggingIn;
554 557
555 // Total number of geometric primitives in the scene 558 // Total number of geometric primitives in the scene
556 sb[23].StatID = (uint)Stats.TotalGeoPrim; 559 sb[24].StatID = (uint)Stats.TotalGeoPrim;
557 sb[23].StatValue = m_numGeoPrim; 560 sb[24].StatValue = m_numGeoPrim;
558 561
559 // Total number of mesh objects in the scene 562 // Total number of mesh objects in the scene
560 sb[24].StatID = (uint)Stats.TotalMesh; 563 sb[25].StatID = (uint)Stats.TotalMesh;
561 sb[24].StatValue = m_numMesh; 564 sb[25].StatValue = m_numMesh;
562 565
563 // Added to track the current number of threads that XEngine is 566 // Current number of threads that XEngine is using
564 // using 567 sb[26].StatID = (uint)Stats.ThreadCount;
565 sb[25].StatID = (uint)Stats.ThreadCount; 568 sb[26].StatValue = m_inUseThreads;
566 sb[25].StatValue = m_inUseThreads;
567 569
568 for (int i = 0; i < m_statisticArraySize; i++) 570 for (int i = 0; i < m_statisticArraySize; i++)
569 { 571 {