()
| 12 | ) |
| 13 | |
| 14 | func GetMemoryUsage() map[string]util.MemoryResult { |
| 15 | ret := map[string]util.MemoryResult{} |
| 16 | |
| 17 | ret["mapperZoneCache"] = util.MemoryResult{Memory: util.MemoryUsage(mapperZoneCache), Count: len(mapperZoneCache)} |
| 18 | ret["roomIdToMapperCache"] = util.MemoryResult{Memory: util.MemoryUsage(roomIdToMapperCache), Count: len(roomIdToMapperCache)} |
| 19 | ret["pathCache"] = util.MemoryResult{Memory: util.MemoryUsage(pathCache), Count: pathCache.Len()} |
| 20 | ret["pathCacheHits"] = util.MemoryResult{Memory: pathCacheHits.Load(), Unit: util.UnitCount} |
| 21 | ret["pathCacheMisses"] = util.MemoryResult{Memory: pathCacheMisses.Load(), Unit: util.UnitCount} |
| 22 | |
| 23 | return ret |
| 24 | } |
| 25 | |
| 26 | func init() { |
| 27 | util.AddMemoryReporter(`Mapper`, GetMemoryUsage) |
nothing calls this directly
no test coverage detected