aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/SimStatsReporter.cs46
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index c8f525e..bc440fc 100755
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -113,12 +113,12 @@ namespace OpenSim.Region.Framework.Scenes
113 SimSpareMs = 32, 113 SimSpareMs = 32,
114 SimSleepMs = 33, 114 SimSleepMs = 33,
115 SimIoPumpTime = 34, 115 SimIoPumpTime = 34,
116 SimPCTSscriptsRun = 35, 116 SimPCTSscriptsRun = 35,
117 SimRegionIdle = 36, // dataserver only 117 SimRegionIdle = 36, // dataserver only
118 SimRegionIdlePossible = 37, // dataserver only 118 SimRegionIdlePossible = 37, // dataserver only
119 SimAIStepTimeMS = 38, 119 SimAIStepTimeMS = 38,
120 SimSkippedSillouet_PS = 39, 120 SimSkippedSillouet_PS = 39,
121 SimSkippedCharsPerC = 40, 121 SimSkippedCharsPerC = 40,
122 122
123// extra stats IDs irrelevant, just far from viewer defined ones 123// extra stats IDs irrelevant, just far from viewer defined ones
124 SimExtraCountStart = 1000, 124 SimExtraCountStart = 1000,
@@ -129,7 +129,7 @@ namespace OpenSim.Region.Framework.Scenes
129 TotalGeoPrim = 1003, 129 TotalGeoPrim = 1003,
130 TotalMesh = 1004, 130 TotalMesh = 1004,
131 ThreadCount = 1005, 131 ThreadCount = 1005,
132 132
133 SimExtraCountEnd = 1006 133 SimExtraCountEnd = 1006
134 } 134 }
135 135
@@ -199,7 +199,7 @@ namespace OpenSim.Region.Framework.Scenes
199 /// </remarks> 199 /// </remarks>
200 private float m_statisticsFPSfactor = 5.0f; 200 private float m_statisticsFPSfactor = 5.0f;
201 private float m_targetFrameTime = 0.1f; 201 private float m_targetFrameTime = 0.1f;
202 // saved last reported value so there is something available for llGetRegionFPS 202 // saved last reported value so there is something available for llGetRegionFPS
203 private float lastReportedSimFPS; 203 private float lastReportedSimFPS;
204 private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize]; 204 private float[] lastReportedSimStats = new float[m_statisticExtraArraySize + m_statisticViewerArraySize];
205 private float m_pfps; 205 private float m_pfps;
@@ -336,7 +336,7 @@ namespace OpenSim.Region.Framework.Scenes
336 { 336 {
337 if (!m_scene.Active) 337 if (!m_scene.Active)
338 return; 338 return;
339 339
340 // dont do it if if still been done 340 // dont do it if if still been done
341 341
342 if(Monitor.TryEnter(m_statsLock)) 342 if(Monitor.TryEnter(m_statsLock))
@@ -367,8 +367,8 @@ namespace OpenSim.Region.Framework.Scenes
367 // factor to consider updates integration time 367 // factor to consider updates integration time
368 float updateTimeFactor = 1.0f / updateElapsed; 368 float updateTimeFactor = 1.0f / updateElapsed;
369 369
370 370
371 // scene frame stats 371 // scene frame stats
372 float reportedFPS; 372 float reportedFPS;
373 float physfps; 373 float physfps;
374 float timeDilation; 374 float timeDilation;
@@ -393,7 +393,7 @@ namespace OpenSim.Region.Framework.Scenes
393 sleeptime = m_sleeptimeMS; 393 sleeptime = m_sleeptimeMS;
394 scriptTimeMS = m_scriptTimeMS; 394 scriptTimeMS = m_scriptTimeMS;
395 totalFrameTime = m_frameMS; 395 totalFrameTime = m_frameMS;
396 // still not inv 396 // still not inv
397 invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0); 397 invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0);
398 398
399 ResetFrameStats(); 399 ResetFrameStats();
@@ -424,10 +424,10 @@ namespace OpenSim.Region.Framework.Scenes
424 } 424 }
425 425
426 // some engines track frame time with error related to the simulation step size 426 // some engines track frame time with error related to the simulation step size
427 if(physfps > reportedFPS) 427 if(physfps > reportedFPS)
428 physfps = reportedFPS; 428 physfps = reportedFPS;
429 429
430 // save the reported value so there is something available for llGetRegionFPS 430 // save the reported value so there is something available for llGetRegionFPS
431 lastReportedSimFPS = reportedFPS; 431 lastReportedSimFPS = reportedFPS;
432 432
433 // scale frame stats 433 // scale frame stats
@@ -461,13 +461,13 @@ namespace OpenSim.Region.Framework.Scenes
461 461
462 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code 462 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code
463 // so that stat numbers are always consistent. 463 // so that stat numbers are always consistent.
464 CheckStatSanity(); 464 CheckStatSanity();
465 465
466 for (int i = 0; i < m_statisticViewerArraySize; i++) 466 for (int i = 0; i < m_statisticViewerArraySize; i++)
467 { 467 {
468 sb[i] = new SimStatsPacket.StatBlock(); 468 sb[i] = new SimStatsPacket.StatBlock();
469 } 469 }
470 470
471 sb[0].StatID = (uint) Stats.TimeDilation; 471 sb[0].StatID = (uint) Stats.TimeDilation;
472 sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3); 472 sb[0].StatValue = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation,3);
473 473
@@ -546,13 +546,13 @@ namespace OpenSim.Region.Framework.Scenes
546 546
547 sb[24].StatID = (uint)Stats.ResidentSizeKb; 547 sb[24].StatID = (uint)Stats.ResidentSizeKb;
548 sb[24].StatValue = 0; 548 sb[24].StatValue = 0;
549 549
550 sb[25].StatID = (uint)Stats.PendingLocalUploads; 550 sb[25].StatID = (uint)Stats.PendingLocalUploads;
551 sb[25].StatValue = 0; 551 sb[25].StatValue = 0;
552 552
553 sb[26].StatID = (uint)Stats.PhysicsPinnedTasks; 553 sb[26].StatID = (uint)Stats.PhysicsPinnedTasks;
554 sb[26].StatValue = 0; 554 sb[26].StatValue = 0;
555 555
556 sb[27].StatID = (uint)Stats.PhysicsLodTasks; 556 sb[27].StatID = (uint)Stats.PhysicsLodTasks;
557 sb[27].StatValue = 0; 557 sb[27].StatValue = 0;
558 558
@@ -623,7 +623,7 @@ namespace OpenSim.Region.Framework.Scenes
623 sbex[5].StatValue = m_inUseThreads; 623 sbex[5].StatValue = m_inUseThreads;
624 lastReportedSimStats[43] = m_inUseThreads; 624 lastReportedSimStats[43] = m_inUseThreads;
625 625
626 SimStats simStats 626 SimStats simStats
627 = new SimStats( 627 = new SimStats(
628 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity, 628 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)m_objectCapacity,
629 rb, sb, sbex, m_scene.RegionInfo.originRegionID); 629 rb, sb, sbex, m_scene.RegionInfo.originRegionID);
@@ -643,7 +643,7 @@ namespace OpenSim.Region.Framework.Scenes
643 m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value; 643 m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value;
644 644
645 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); 645 Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats();
646 646
647 if (physicsStats != null) 647 if (physicsStats != null)
648 { 648 {
649 foreach (KeyValuePair<string, float> tuple in physicsStats) 649 foreach (KeyValuePair<string, float> tuple in physicsStats)
@@ -717,7 +717,7 @@ namespace OpenSim.Region.Framework.Scenes
717 717
718 m_FrameStatsTS = Util.GetTimeStampMS(); 718 m_FrameStatsTS = Util.GetTimeStampMS();
719 } 719 }
720 } 720 }
721 721
722 private void ResetFrameStats() 722 private void ResetFrameStats()
723 { 723 {