MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / queueString

Method queueString

cmd/disk-cache-utils.go:510–524  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

508}
509
510func (f *fileScorer) queueString() string {
511 var res strings.Builder
512 e := f.queue.Front()
513 i := 0
514 for e != nil {
515 v := e.Value.(queuedFile)
516 if i > 0 {
517 res.WriteByte('\n')
518 }
519 res.WriteString(fmt.Sprintf("%03d: %s (score: %.3f, bytes: %d)", i, v.name, v.score, v.size))
520 i++
521 e = e.Next()
522 }
523 return res.String()
524}
525
526// bytesToClear() returns the number of bytes to clear to reach low watermark
527// w.r.t quota given disk total and free space, quota in % allocated to cache

Callers 1

TestNewFileScorerFunction · 0.80

Calls 1

StringMethod · 0.65

Tested by 1

TestNewFileScorerFunction · 0.64