MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / Len

Method Len

internal/utils/sync/map_int.go:100–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98}
99
100func (this *IntMap[K, V]) Len() int {
101 var l int
102 for i := 0; i < this.count; i++ {
103 this.lockers[i].RLock()
104 l += len(this.m[i])
105 this.lockers[i].RUnlock()
106 }
107 return l
108}
109
110func (this *IntMap[K, V]) ForEachRead(iterator func(k K, v V)) {
111 for i := 0; i < this.count; i++ {

Callers 10

GetMethod · 0.45
GetFunction · 0.45
openBFileMethod · 0.45
shiftOpenFilesMethod · 0.45
CompactMethod · 0.45
TestIntMapFunction · 0.45
TestInt64MapFunction · 0.45
TestIntMap_ForEachReadFunction · 0.45
TestIntMap_ForEachWriteFunction · 0.45
TestMethod · 0.45

Calls 2

RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by 4

TestIntMapFunction · 0.36
TestInt64MapFunction · 0.36
TestIntMap_ForEachReadFunction · 0.36
TestIntMap_ForEachWriteFunction · 0.36