SimStatsReporter.cs 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSimulator Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using System.Collections.Generic;
  29. using System.Timers;
  30. using System.Threading;
  31. using OpenMetaverse.Packets;
  32. using OpenSim.Framework;
  33. using OpenSim.Framework.Monitoring;
  34. using OpenSim.Region.Framework.Interfaces;
  35. namespace OpenSim.Region.Framework.Scenes
  36. {
  37. /// <summary>
  38. /// Collect statistics from the scene to send to the client and for access by other monitoring tools.
  39. /// </summary>
  40. /// <remarks>
  41. /// FIXME: This should be a monitoring region module
  42. /// </remarks>
  43. public class SimStatsReporter
  44. {
  45. private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
  46. public delegate void SendStatResult(SimStats stats);
  47. public event SendStatResult OnSendStatsResult;
  48. public delegate void YourStatsAreWrong();
  49. public event YourStatsAreWrong OnStatsIncorrect;
  50. // size of LastReportedSimFPS with extra stats.
  51. private const int m_statisticExtraArraySize = (int)(StatsIndex.ArraySize - StatsIndex.ViewerArraySize);
  52. /// <summary>
  53. /// This is for llGetRegionFPS
  54. /// </summary>
  55. public float LastReportedSimFPS
  56. {
  57. get { return lastReportedSimFPS; }
  58. }
  59. /// <summary>
  60. /// Number of object updates performed in the last stats cycle
  61. /// </summary>
  62. /// <remarks>
  63. /// This isn't sent out to the client but it is very useful data to detect whether viewers are being sent a
  64. /// large number of object updates.
  65. /// </remarks>
  66. public float LastReportedObjectUpdates { get; private set; }
  67. public float[] LastReportedSimStats
  68. {
  69. get { return lastReportedSimStats; }
  70. }
  71. /// <summary>
  72. /// Number of frames that have taken longer to process than Scene.MIN_FRAME_TIME
  73. /// </summary>
  74. public Stat SlowFramesStat { get; private set; }
  75. /// <summary>
  76. /// The threshold at which we log a slow frame.
  77. /// </summary>
  78. public int SlowFramesStatReportThreshold { get; private set; }
  79. /// <summary>
  80. /// Extra sim statistics that are used by monitors but not sent to the client.
  81. /// </summary>
  82. /// <value>
  83. /// The keys are the stat names.
  84. /// </value>
  85. private Dictionary<string, float> m_lastReportedExtraSimStats = new Dictionary<string, float>();
  86. // Sending a stats update every 3 seconds-
  87. private int m_statsUpdatesEveryMS = 3000;
  88. private double m_lastUpdateTS;
  89. private double m_prevFrameStatsTS;
  90. private double m_FrameStatsTS;
  91. private float m_timeDilation;
  92. private int m_fps;
  93. private object m_statsLock = new object();
  94. private object m_statsFrameLock = new object();
  95. /// <summary>
  96. /// Parameter to adjust reported scene fps
  97. /// </summary>
  98. /// <remarks>
  99. /// The close we have to a frame rate as expected by viewers, users and scripts
  100. /// is heartbeat rate.
  101. /// heartbeat rate default value is very diferent from the expected one
  102. /// and can be changed from region to region acording to its specific simulation needs
  103. /// since this creates incompatibility with expected values,
  104. /// this scale factor can be used to normalize values to a Virtual FPS.
  105. /// original decision was to use a value of 55fps for all opensim
  106. /// corresponding, with default heartbeat rate, to a value of 5.
  107. /// </remarks>
  108. private float m_statisticsFPSfactor = 5.0f;
  109. private float m_targetFrameTime = 0.1f;
  110. // saved last reported value so there is something available for llGetRegionFPS
  111. private float lastReportedSimFPS;
  112. private float[] lastReportedSimStats = new float[(int)StatsIndex.ViewerArraySize];
  113. private float m_pfps;
  114. /// <summary>
  115. /// Number of agent updates requested in this stats cycle
  116. /// </summary>
  117. private int m_agentUpdates;
  118. /// <summary>
  119. /// Number of object updates requested in this stats cycle
  120. /// </summary>
  121. private int m_objectUpdates;
  122. private float m_frameMS;
  123. private float m_netMS;
  124. private float m_agentMS;
  125. private float m_physicsMS;
  126. private float m_imageMS;
  127. private float m_otherMS;
  128. private float m_sleeptimeMS;
  129. private float m_scriptTimeMS;
  130. private int m_inPacketsPerSecond;
  131. private int m_outPacketsPerSecond;
  132. private int m_unAckedBytes;
  133. private int m_pendingDownloads;
  134. private int m_pendingUploads = 0; // FIXME: Not currently filled in
  135. private int m_activeScripts;
  136. private int m_scriptLinesPerSecond;
  137. private int m_scriptEventsPerSecond;
  138. private int m_objectCapacity = 45000;
  139. // The current number of users attempting to login to the region
  140. private int m_usersLoggingIn;
  141. // The last reported value of threads from the SmartThreadPool inside of
  142. // XEngine
  143. private int m_inUseThreads;
  144. private Scene m_scene;
  145. private RegionInfo ReportingRegion;
  146. private System.Timers.Timer m_report = new System.Timers.Timer();
  147. private IEstateModule estateModule;
  148. public SimStatsReporter(Scene scene)
  149. {
  150. m_scene = scene;
  151. ReportingRegion = scene.RegionInfo;
  152. if(scene.Normalized55FPS)
  153. m_statisticsFPSfactor = 55.0f * m_scene.FrameTime;
  154. else
  155. m_statisticsFPSfactor = 1.0f;
  156. m_targetFrameTime = 1000.0f * m_scene.FrameTime / m_statisticsFPSfactor;
  157. m_objectCapacity = scene.RegionInfo.ObjectCapacity;
  158. m_report.AutoReset = true;
  159. m_report.Interval = m_statsUpdatesEveryMS;
  160. m_report.Elapsed += TriggerStatsHeartbeat;
  161. m_report.Enabled = true;
  162. m_lastUpdateTS = Util.GetTimeStampMS();
  163. m_FrameStatsTS = m_lastUpdateTS;
  164. m_prevFrameStatsTS = m_lastUpdateTS;
  165. if (StatsManager.SimExtraStats != null)
  166. OnSendStatsResult += StatsManager.SimExtraStats.ReceiveClassicSimStatsPacket;
  167. /// At the moment, we'll only report if a frame is over 120% of target, since commonly frames are a bit
  168. /// longer than ideal (which in itself is a concern).
  169. SlowFramesStatReportThreshold = (int)Math.Ceiling(m_scene.FrameTime * 1000 * 1.2);
  170. SlowFramesStat
  171. = new Stat(
  172. "SlowFrames",
  173. "Slow Frames",
  174. "Number of frames where frame time has been significantly longer than the desired frame time.",
  175. " frames",
  176. "scene",
  177. m_scene.Name,
  178. StatType.Push,
  179. null,
  180. StatVerbosity.Info);
  181. StatsManager.RegisterStat(SlowFramesStat);
  182. }
  183. public void Close()
  184. {
  185. m_report.Elapsed -= TriggerStatsHeartbeat;
  186. m_report.Close();
  187. }
  188. /// <summary>
  189. /// Sets the number of milliseconds between stat updates.
  190. /// </summary>
  191. /// <param name='ms'></param>
  192. public void SetUpdateMS(int ms)
  193. {
  194. m_statsUpdatesEveryMS = ms;
  195. m_report.Interval = m_statsUpdatesEveryMS;
  196. }
  197. private void TriggerStatsHeartbeat(object sender, EventArgs args)
  198. {
  199. try
  200. {
  201. statsHeartBeat(sender, args);
  202. }
  203. catch (Exception e)
  204. {
  205. m_log.Warn(string.Format(
  206. "[SIM STATS REPORTER] Update for {0} failed with exception ",
  207. m_scene.RegionInfo.RegionName), e);
  208. }
  209. }
  210. private void statsHeartBeat(object sender, EventArgs e)
  211. {
  212. if (!m_scene.Active)
  213. return;
  214. // dont do it if if still been done
  215. if(Monitor.TryEnter(m_statsLock))
  216. {
  217. // m_log.Debug("Firing Stats Heart Beat");
  218. float[] newvalues = new float[(int)StatsIndex.ArraySize];
  219. uint regionFlags = 0;
  220. try
  221. {
  222. if (estateModule == null)
  223. estateModule = m_scene.RequestModuleInterface<IEstateModule>();
  224. regionFlags = estateModule != null ? estateModule.GetRegionFlags() : (uint) 0;
  225. }
  226. catch (Exception)
  227. {
  228. // leave region flags at 0
  229. }
  230. #region various statistic googly moogly
  231. double timeTmp = m_lastUpdateTS;
  232. m_lastUpdateTS = Util.GetTimeStampMS();
  233. float updateElapsed = (float)((m_lastUpdateTS - timeTmp)/1000.0);
  234. // factor to consider updates integration time
  235. float updateTimeFactor = 1.0f / updateElapsed;
  236. // scene frame stats
  237. float reportedFPS;
  238. float physfps;
  239. float timeDilation;
  240. float agentMS;
  241. float physicsMS;
  242. float otherMS;
  243. float sleeptime;
  244. float scriptTimeMS;
  245. float totalFrameTime;
  246. float invFrameElapsed;
  247. // get a copy under lock and reset
  248. lock(m_statsFrameLock)
  249. {
  250. timeDilation = m_timeDilation;
  251. reportedFPS = m_fps;
  252. physfps = m_pfps;
  253. agentMS = m_agentMS;
  254. physicsMS = m_physicsMS;
  255. otherMS = m_otherMS;
  256. sleeptime = m_sleeptimeMS;
  257. scriptTimeMS = m_scriptTimeMS;
  258. totalFrameTime = m_frameMS;
  259. // still not inv
  260. invFrameElapsed = (float)((m_FrameStatsTS - m_prevFrameStatsTS) / 1000.0);
  261. ResetFrameStats();
  262. }
  263. if (invFrameElapsed / updateElapsed < 0.8)
  264. // scene is in trouble, its account of time is most likely wrong
  265. // can even be in stall
  266. invFrameElapsed = updateTimeFactor;
  267. else
  268. invFrameElapsed = 1.0f / invFrameElapsed;
  269. float perframefactor;
  270. if (reportedFPS <= 0)
  271. {
  272. reportedFPS = 0.0f;
  273. physfps = 0.0f;
  274. perframefactor = 1.0f;
  275. timeDilation = 0.0f;
  276. }
  277. else
  278. {
  279. timeDilation /= reportedFPS;
  280. reportedFPS *= m_statisticsFPSfactor;
  281. perframefactor = 1.0f / (float)reportedFPS;
  282. reportedFPS *= invFrameElapsed;
  283. physfps *= invFrameElapsed * m_statisticsFPSfactor;
  284. }
  285. // some engines track frame time with error related to the simulation step size
  286. if(physfps > reportedFPS)
  287. physfps = reportedFPS;
  288. // save the reported value so there is something available for llGetRegionFPS
  289. lastReportedSimFPS = reportedFPS;
  290. // scale frame stats
  291. totalFrameTime *= perframefactor;
  292. sleeptime *= perframefactor;
  293. otherMS *= perframefactor;
  294. physicsMS *= perframefactor;
  295. agentMS *= perframefactor;
  296. scriptTimeMS *= perframefactor;
  297. // estimate spare time
  298. float sparetime;
  299. sparetime = m_targetFrameTime - (physicsMS + agentMS + otherMS);
  300. if (sparetime < 0)
  301. sparetime = 0;
  302. else if (sparetime > totalFrameTime)
  303. sparetime = totalFrameTime;
  304. #endregion
  305. SceneGraph SG = m_scene.SceneGraph;
  306. OnStatsIncorrect?.Invoke(); // number of agents may still drift so fix
  307. m_activeScripts = SG.GetActiveScriptsCount();
  308. m_scriptLinesPerSecond = SG.GetScriptLPS();
  309. newvalues[(int)StatsIndex.TimeDilation] = (Single.IsNaN(timeDilation)) ? 0.0f : (float)Math.Round(timeDilation, 3);
  310. newvalues[(int)StatsIndex.SimFPS] = (float)Math.Round(reportedFPS, 1);
  311. newvalues[(int)StatsIndex.PhysicsFPS] = (float)Math.Round(physfps, 1);
  312. newvalues[(int)StatsIndex.AgentUpdates] = m_agentUpdates * updateTimeFactor;
  313. newvalues[(int)StatsIndex.Agents] = SG.GetRootAgentCount();
  314. newvalues[(int)StatsIndex.ChildAgents] = SG.GetChildAgentCount();
  315. newvalues[(int)StatsIndex.TotalPrim] = SG.GetTotalObjectsCount();
  316. newvalues[(int)StatsIndex.ActivePrim] = SG.GetActiveObjectsCount();
  317. newvalues[(int)StatsIndex.FrameMS] = totalFrameTime;
  318. newvalues[(int)StatsIndex.NetMS] = (float)Math.Round(m_netMS * perframefactor, 3);
  319. newvalues[(int)StatsIndex.PhysicsMS] = (float)Math.Round(physicsMS, 3);
  320. newvalues[(int)StatsIndex.ImageMS] = (float)Math.Round(m_imageMS * perframefactor, 3);
  321. newvalues[(int)StatsIndex.OtherMS] = (float)Math.Round(otherMS, 3);
  322. newvalues[(int)StatsIndex.InPacketsPerSecond] = (float)Math.Round(m_inPacketsPerSecond * updateTimeFactor);
  323. newvalues[(int)StatsIndex.OutPacketsPerSecond] = (float)Math.Round(m_outPacketsPerSecond * updateTimeFactor);
  324. newvalues[(int)StatsIndex.UnAckedBytes] = m_unAckedBytes;
  325. newvalues[(int)StatsIndex.AgentMS] = agentMS;
  326. newvalues[(int)StatsIndex.PendingDownloads] = m_pendingDownloads;
  327. newvalues[(int)StatsIndex.PendingUploads] = m_pendingUploads;
  328. newvalues[(int)StatsIndex.ActiveScripts] = m_activeScripts;
  329. newvalues[(int)StatsIndex.SimSleepMs] = (float)Math.Round(sleeptime, 3);
  330. newvalues[(int)StatsIndex.SimSpareMs] = (float)Math.Round(sparetime, 3);
  331. newvalues[(int)StatsIndex.SimPhysicsStepMs] = 20; // this should came from phys engine
  332. newvalues[(int)StatsIndex.ScriptMS] = scriptTimeMS;
  333. newvalues[(int)StatsIndex.ScriptEps] = (float)Math.Round(m_scriptEventsPerSecond * updateTimeFactor);
  334. // add extra stats for internal use
  335. newvalues[(int)StatsIndex.LSLScriptLinesPerSecond] = (float)Math.Round(m_scriptLinesPerSecond * updateTimeFactor, 3);
  336. newvalues[(int)StatsIndex.FrameDilation2] = (Single.IsNaN(timeDilation)) ? 0.1f : (float)Math.Round(timeDilation, 1);
  337. newvalues[(int)StatsIndex.UsersLoggingIn] = m_usersLoggingIn;
  338. newvalues[(int)StatsIndex.TotalGeoPrim] = SG.GetTotalPrimObjectsCount();
  339. newvalues[(int)StatsIndex.TotalMesh] = SG.GetTotalMeshObjectsCount();
  340. newvalues[(int)StatsIndex.ScriptEngineThreadCount] = m_inUseThreads;
  341. newvalues[(int)StatsIndex.NPCs] = SG.GetRootNPCCount();
  342. lastReportedSimStats = newvalues;
  343. OnSendStatsResult?.Invoke(new SimStats(
  344. ReportingRegion.RegionLocX, ReportingRegion.RegionLocY,
  345. ReportingRegion.RegionSizeX, ReportingRegion.RegionSizeY,
  346. regionFlags, (uint)m_objectCapacity,
  347. newvalues,
  348. m_scene.RegionInfo.originRegionID,
  349. m_scene.RegionInfo.RegionName)
  350. );
  351. // Extra statistics that aren't currently sent elsewhere
  352. if (m_scene.PhysicsScene != null)
  353. {
  354. lock (m_lastReportedExtraSimStats)
  355. {
  356. m_lastReportedExtraSimStats["LastReportedObjectUpdates"] = m_objectUpdates * updateTimeFactor;
  357. m_lastReportedExtraSimStats[SlowFramesStat.ShortName] = (float)SlowFramesStat.Value;
  358. Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats();
  359. if (physicsStats != null)
  360. {
  361. foreach (KeyValuePair<string, float> tuple in physicsStats)
  362. {
  363. // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second
  364. // Need to change things so that stats source can indicate whether they are per second or
  365. // per frame.
  366. if (tuple.Key.EndsWith("MS"))
  367. m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframefactor;
  368. else
  369. m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * updateTimeFactor;
  370. }
  371. }
  372. }
  373. }
  374. // LastReportedObjectUpdates = m_objectUpdates / m_statsUpdateFactor;
  375. ResetValues();
  376. Monitor.Exit(m_statsLock);
  377. }
  378. }
  379. private void ResetValues()
  380. {
  381. m_agentUpdates = 0;
  382. m_objectUpdates = 0;
  383. m_unAckedBytes = 0;
  384. m_scriptEventsPerSecond = 0;
  385. m_netMS = 0;
  386. m_imageMS = 0;
  387. }
  388. # region methods called from Scene
  389. public void AddFrameStats(float _timeDilation, float _physicsFPS, float _agentMS,
  390. float _physicsMS, float _otherMS , float _sleepMS,
  391. float _frameMS, float _scriptTimeMS)
  392. {
  393. lock(m_statsFrameLock)
  394. {
  395. m_fps++;
  396. m_timeDilation += _timeDilation;
  397. m_pfps += _physicsFPS;
  398. m_agentMS += _agentMS;
  399. m_physicsMS += _physicsMS;
  400. m_otherMS += _otherMS;
  401. m_sleeptimeMS += _sleepMS;
  402. m_frameMS += _frameMS;
  403. m_scriptTimeMS += _scriptTimeMS;
  404. if (_frameMS > SlowFramesStatReportThreshold)
  405. SlowFramesStat.Value++;
  406. m_FrameStatsTS = Util.GetTimeStampMS();
  407. }
  408. }
  409. private void ResetFrameStats()
  410. {
  411. m_fps = 0;
  412. m_timeDilation = 0.0f;
  413. m_pfps = 0.0f;
  414. m_agentMS = 0.0f;
  415. m_physicsMS = 0.0f;
  416. m_otherMS = 0.0f;
  417. m_sleeptimeMS = 0.0f;
  418. m_frameMS = 0.0f;
  419. m_scriptTimeMS = 0.0f;
  420. m_prevFrameStatsTS = m_FrameStatsTS;
  421. }
  422. public void AddObjectUpdates(int numUpdates)
  423. {
  424. m_objectUpdates += numUpdates;
  425. }
  426. public void AddAgentUpdates(int numUpdates)
  427. {
  428. m_agentUpdates += numUpdates;
  429. }
  430. public void AddInPackets(int numPackets)
  431. {
  432. m_inPacketsPerSecond = numPackets;
  433. }
  434. public void AddOutPackets(int numPackets)
  435. {
  436. m_outPacketsPerSecond = numPackets;
  437. }
  438. public void AddunAckedBytes(int numBytes)
  439. {
  440. m_unAckedBytes += numBytes;
  441. if (m_unAckedBytes < 0) m_unAckedBytes = 0;
  442. }
  443. public void addNetMS(float ms)
  444. {
  445. m_netMS += ms;
  446. }
  447. public void addImageMS(float ms)
  448. {
  449. m_imageMS += ms;
  450. }
  451. public void AddPendingDownloads(int count)
  452. {
  453. m_pendingDownloads += count;
  454. if (m_pendingDownloads < 0)
  455. m_pendingDownloads = 0;
  456. //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads);
  457. }
  458. public void addScriptEvents(int count)
  459. {
  460. Interlocked.Add(ref m_scriptEventsPerSecond, count);
  461. }
  462. public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
  463. {
  464. AddInPackets(inPackets);
  465. AddOutPackets(outPackets);
  466. AddunAckedBytes(unAckedBytes);
  467. }
  468. public void UpdateUsersLoggingIn(bool isLoggingIn)
  469. {
  470. // Determine whether the user has started logging in or has completed
  471. // logging into the region
  472. if (isLoggingIn)
  473. {
  474. // The user is starting to login to the region so increment the
  475. // number of users attempting to login to the region
  476. m_usersLoggingIn++;
  477. }
  478. else
  479. {
  480. // The user has finished logging into the region so decrement the
  481. // number of users logging into the region
  482. m_usersLoggingIn--;
  483. }
  484. }
  485. public void SetThreadCount(int inUseThreads)
  486. {
  487. // Save the new number of threads to our member variable to send to
  488. // the extra stats collector
  489. m_inUseThreads = inUseThreads;
  490. }
  491. #endregion
  492. public Dictionary<string, float> GetExtraSimStats()
  493. {
  494. lock (m_lastReportedExtraSimStats)
  495. return new Dictionary<string, float>(m_lastReportedExtraSimStats);
  496. }
  497. }
  498. }