MCPcopy Create free account
hub / github.com/cph6/zsync / showProgress

Method showProgress

cmd/zsync/main.go:381–385  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

379}
380
381func (p *progressReporter) showProgress() {
382 got, total := p.zs.Progress()
383 elapsed := time.Since(p.startTime)
384 fmt.Fprintf(os.Stderr, "\r%s %3.1fMBps %02.1f%% of target obtained", elapsed.Truncate(time.Millisecond*100).String(), float64(got-p.startBytes)/elapsed.Seconds()/1000000.0, float64(got)/float64(total)*100)
385}
386
387func (p *progressReporter) progress(url string, event zsync.FetchEvent, err error) {
388 p.mu.Lock()

Callers 2

ShowProgressLoopMethod · 0.95
progressMethod · 0.95

Calls 2

ProgressMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected