MCPcopy
hub / github.com/kopia/kopia / Add

Method Add

internal/stats/countsum.go:16–18  ·  view source on GitHub ↗

Add adds size to s and returns approximate values for the current count and total bytes.

(size int64)

Source from the content-addressed store, hash-verified

14// Add adds size to s and returns approximate values for the current count
15// and total bytes.
16func (s *CountSum) Add(size int64) (count uint32, sum int64) {
17 return s.count.Add(1), s.sum.Add(size)
18}
19
20// Approximate returns an approximation of the current count and sum values.
21// It is approximate because retrieving both values is not an atomic operation.

Callers 15

runSyncBlobsMethod · 0.95
runMethod · 0.95
DeleteUnreferencedPacksFunction · 0.95
verifyCacheExpirationFunction · 0.45
reportMissErrorMethod · 0.45
reportMissBytesMethod · 0.45
reportHitBytesMethod · 0.45
reportMalformedDataMethod · 0.45
reportStoreErrorMethod · 0.45
runMethod · 0.45

Calls

no outgoing calls

Tested by 15

verifyCacheExpirationFunction · 0.36
TestSchedulerFunction · 0.36
TestSchedulerRefreshFunction · 0.36
NewConnectionMethod · 0.36
TestOnNthCompletionFunction · 0.36
TestShouldAdvanceEpochFunction · 0.36
verifySequentialWritesFunction · 0.36
TestNewTimerFunction · 0.36