MCPcopy
hub / github.com/perkeep/perkeep / BlobrefStrings

Method BlobrefStrings

pkg/blobserver/memory/mem.go:300–309  ·  view source on GitHub ↗

BlobrefStrings returns the sorted stringified blobrefs stored in s.

()

Source from the content-addressed store, hash-verified

298
299// BlobrefStrings returns the sorted stringified blobrefs stored in s.
300func (s *Storage) BlobrefStrings() []string {
301 s.mu.RLock()
302 defer s.mu.RUnlock()
303 sorted := make([]string, 0, len(s.m))
304 for br := range s.m {
305 sorted = append(sorted, br.String())
306 }
307 sort.Strings(sorted)
308 return sorted
309}
310
311// Stats returns the number of blobs and number of bytes that were fetched from s.
312func (s *Storage) Stats() (blobsFetched, bytesFetched int64) {

Callers 3

TestReceiveCorruptFunction · 0.80
TestArchiverFunction · 0.80
TestArchiverStressFunction · 0.80

Calls 3

RLockMethod · 0.65
RUnlockMethod · 0.65
StringMethod · 0.45

Tested by 3

TestReceiveCorruptFunction · 0.64
TestArchiverFunction · 0.64
TestArchiverStressFunction · 0.64