MCPcopy
hub / github.com/kopia/kopia / outputSyncProgress

Method outputSyncProgress

cli/command_repository_sync.go:204–221  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

202}
203
204func (c *commandRepositorySyncTo) outputSyncProgress(s string) {
205 if !c.progress.Enabled() {
206 return
207 }
208
209 c.syncProgressMutex.Lock()
210 defer c.syncProgressMutex.Unlock()
211
212 if len(s) < len(c.lastSyncProgress) {
213 s += strings.Repeat(" ", len(c.lastSyncProgress)-len(s))
214 }
215
216 if c.nextSyncOutputTime.ShouldOutput(syncProgressInterval) {
217 c.out.printStderr("\r%v", s)
218 }
219
220 c.lastSyncProgress = s
221}
222
223func (c *commandRepositorySyncTo) finishSyncProcess() {
224 if !c.progress.Enabled() {

Callers 3

runSyncWithStorageMethod · 0.95
listDestinationBlobsMethod · 0.95
runSyncBlobsMethod · 0.95

Calls 6

RepeatMethod · 0.80
ShouldOutputMethod · 0.80
printStderrMethod · 0.80
EnabledMethod · 0.65
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected