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

Method Debug

internal/caches/open_file_cache.go:167–178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

165}
166
167func (this *OpenFileCache) Debug() {
168 var ticker = time.NewTicker(5 * time.Second)
169 goman.New(func() {
170 for range ticker.C {
171 logs.Println("==== " + types.String(this.count) + ", " + fmt.Sprintf("%.4fMB", float64(this.usedSize)/(1<<20)) + " ====")
172 this.poolList.Range(func(item *linkedlist.Item[*OpenFilePool]) (goNext bool) {
173 logs.Println(filepath.Base(item.Value.Filename()), item.Value.Len())
174 return true
175 })
176 }
177 })
178}
179
180func (this *OpenFileCache) consumeHead() {
181 var delta = 1

Callers 3

Calls 5

NewFunction · 0.92
RangeMethod · 0.80
StringMethod · 0.45
FilenameMethod · 0.45
LenMethod · 0.45

Tested by 3