MCPcopy
hub / github.com/kopia/kopia / Completed

Method Completed

internal/timetrack/estimator.go:55–62  ·  view source on GitHub ↗

Completed computes the duration and speed (total per second).

(total float64)

Source from the content-addressed store, hash-verified

53
54// Completed computes the duration and speed (total per second).
55func (v Estimator) Completed(total float64) (totalTime time.Duration, speed float64) {
56 dur := time.Since(v.startTime) //nolint:forbidigo
57 if dur <= 0 {
58 return 0, 0
59 }
60
61 return dur, total / dur.Seconds()
62}
63
64// Start returns an Estimator object.
65func Start() Estimator {

Callers 7

runBenchmarkMethod · 0.80
runBenchmarkMethod · 0.80
runBenchmarkMethod · 0.80
runBenchmarkMethod · 0.80
runMethod · 0.80
runCompressionMethod · 0.80
runDecompressionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected