MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / GetMemoryUsage

Function GetMemoryUsage

internal/mapper/memory.go:14–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12)
13
14func 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
26func init() {
27 util.AddMemoryReporter(`Mapper`, GetMemoryUsage)

Callers

nothing calls this directly

Calls 2

MemoryUsageFunction · 0.92
LenMethod · 0.45

Tested by

no test coverage detected