| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using DCL; |
| | 4 | | using DCL.Controllers; |
| | 5 | | using DCL.FPSDisplay; |
| | 6 | | using UnityEngine.Profiling; |
| | 7 | |
|
| | 8 | | public class MemoryDesktopDebugMetricModule : IDebugMetricModule |
| | 9 | | { |
| | 10 | |
|
| | 11 | | private const string NO_DECIMALS = "##"; |
| | 12 | | private const float BYTES_TO_MEGABYTES = 1048576f; |
| | 13 | |
|
| | 14 | | public void SetUpModule(Dictionary<DebugValueEnum, Func<string>> updateValueDictionary) |
| | 15 | | { |
| 0 | 16 | | updateValueDictionary.Add(DebugValueEnum.Memory_Total_Allocated, () => $"{(Profiler.GetTotalAllocatedMemoryLong |
| 0 | 17 | | updateValueDictionary.Add(DebugValueEnum.Memory_Reserved_Ram, () => $"{(Profiler.GetTotalReservedMemoryLong() / |
| 0 | 18 | | updateValueDictionary.Add(DebugValueEnum.Memory_Mono, () => $"{(Profiler.GetMonoUsedSizeLong() / BYTES_TO_MEGABY |
| 0 | 19 | | updateValueDictionary.Add(DebugValueEnum.Memory_Graphics_Card, () => $"{(Profiler.GetAllocatedMemoryForGraphicsD |
| 0 | 20 | | } |
| | 21 | |
|
| 0 | 22 | | public void UpdateModule() { } |
| 0 | 23 | | public void EnableModule() { } |
| 0 | 24 | | public void DisableModule() { } |
| | 25 | |
|
| 0 | 26 | | public void Dispose() { } |
| | 27 | |
|
| | 28 | | } |