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

Function GetMemoryUsage

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

Source from the content-addressed store, hash-verified

3import "github.com/GoMudEngine/GoMud/internal/util"
4
5func GetMemoryUsage() map[string]util.MemoryResult {
6 lock.Lock()
7 defer lock.Unlock()
8
9 ret := map[string]util.MemoryResult{}
10
11 ret["badCommands"] = util.MemoryResult{Memory: util.MemoryUsage(badCommands), Count: len(badCommands)}
12
13 return ret
14}
15
16func init() {
17 util.AddMemoryReporter(`BadInputTracker`, GetMemoryUsage)

Callers

nothing calls this directly

Calls 3

MemoryUsageFunction · 0.92
LockMethod · 0.80
UnlockMethod · 0.80

Tested by

no test coverage detected