code: func (r *progressReporter) advance(f fs.File) {
  	if r.totalCount == 0 {
  		return
  	}
  
  	now := clock.Now(r.ctx)
  	reportNow := false
  	progress := 0
  
  	// We don't count size of the symlinks toward total.
  	var size uint64
  	if !f.Symlink() {
  		size = f.Size()
  	}
  
  	// Report progress on first and last 'advance' calls and each 2 sec.
  	r.Lock()
  	r.extractedSize += size
  	r.extractedCount++
  	if r.extractedCount == 1 || r.extractedCount == r.totalCount || now.Sub(r.prevReport) > 2*time.Second {
  		reportNow = true
  		if r.totalSize != 0 {
  			progress = int(float64(r.extractedSize) * 100 / float64(r.totalSize))
  		} else {
  			progress = int(float64(r.extractedCount) * 100 / float64(r.totalCount))
  		}
  		r.prevReport = now
  	}
  	r.Unlock()
  
  	if reportNow {
  		logging.Infof(r.ctx, "cipd: extracting - %d%%", progress)
  	}
  }
docs: // advance moves the progress indicator, occasionally logging it.