MCPcopy
hub / github.com/syncthing/syncthing / copiedFromOrigin

Method copiedFromOrigin

lib/model/sharedpullerstate.go:273–279  ·  view source on GitHub ↗
(bytes int)

Source from the content-addressed store, hash-verified

271}
272
273func (s *sharedPullerState) copiedFromOrigin(bytes int) {
274 s.mut.Lock()
275 s.copyOrigin++
276 s.updated = time.Now()
277 s.mut.Unlock()
278 metricFolderProcessedBytesTotal.WithLabelValues(s.folder, metricSourceLocalOrigin).Add(float64(bytes))
279}
280
281func (s *sharedPullerState) copiedFromElsewhere(bytes int) {
282 metricFolderProcessedBytesTotal.WithLabelValues(s.folder, metricSourceLocalOther).Add(float64(bytes))

Callers 3

TestProgressEmitterFunction · 0.95
copyBlockMethod · 0.80
copyBlockFromFolderMethod · 0.80

Calls 3

UnlockMethod · 0.80
NowMethod · 0.65
AddMethod · 0.45

Tested by 1

TestProgressEmitterFunction · 0.76