public void CollectInfo() { m_text.Length = 0; m_lines = 13; m_text.ConcatFormat("Currently allocated: {0}\n", m_allocMem.GetKiloString()); m_text.ConcatFormat("Peak allocated: {0}\n", m_peakAlloc.GetKiloString()); m_text.ConcatFormat("Last collected: {0}\n", m_collectAlloc.GetKiloString()); m_text.ConcatFormat("Allocation rate: {0}\n", m_allocRate.GetKiloString()); m_text.ConcatFormat("Collection freq: {0:0.00}s\n", m_delta); m_text.ConcatFormat("Last collect delta: {0:0.000}s ({1:0.0} FPS)\n", m_lastDeltaTime, 1f / m_lastDeltaTime); if (World != null) { ++m_lines; m_text.ConcatFormat("Chunks: {0}\n", World.Count); } // Tasks m_text.Append("-------------------------------------------------------\n"); m_text.ConcatFormat("TP tasks: {0}\n", WorkPoolManager.ToString()); m_text.ConcatFormat("IO tasks: {0}\n", IOPoolManager.ToString()); // Individual object pools m_text.Append("-------------------------------------------------------\n"); m_text.ConcatFormat("{0}\n", GameObjectProvider.Instance.ToString()); m_text.ConcatFormat("Main pools: {0}\n", Globals.MemPools.ToString()); // the main thread pool m_text.ConcatFormat("IO pools: {0}\n", Globals.IOPool.Pools.ToString()); // io pool for (int i = 0; i < Globals.WorkPool.Size; i++) { ++m_lines; m_text.ConcatFormat("TP #{0} pools: {1}\n", i + 1, Globals.WorkPool.GetPool(i).ToString()); // thread pool } }