MCPcopy Index your code
hub / github.com/docker/docker-agent / Length

Method Length

pkg/concurrent/map.go:44–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42}
43
44func (m *Map[K, V]) Length() int {
45 m.mu.RLock()
46 defer m.mu.RUnlock()
47
48 return len(m.values)
49}
50
51// LoadOrStore returns the existing value for key if present; otherwise it
52// stores and returns value. The loaded result is true if the value was

Callers 14

LenMethod · 0.45
totalTaskCountMethod · 0.45
GetSessionsMethod · 0.45
GetSessionSummariesMethod · 0.45
TestMap_StoreOverwritesFunction · 0.45
TestMap_DeleteFunction · 0.45
TestMap_LengthFunction · 0.45
TestMap_ConcurrentFunction · 0.45
TestMap_ClearFunction · 0.45
TestMap_ClearZeroValueFunction · 0.45
TestSlice_AppendFunction · 0.45

Calls

no outgoing calls

Tested by 9

TestMap_StoreOverwritesFunction · 0.36
TestMap_DeleteFunction · 0.36
TestMap_LengthFunction · 0.36
TestMap_ConcurrentFunction · 0.36
TestMap_ClearFunction · 0.36
TestMap_ClearZeroValueFunction · 0.36
TestSlice_AppendFunction · 0.36
TestSlice_ConcurrentFunction · 0.36