code: func (m *Meter) TransferBytes(direction, name string, read, total int64, current int) {
  	if m == nil {
  		return
  	}
  
  	defer m.update(false)
  
  	now := time.Now()
  	since := now.Sub(m.lastAvg)
  	atomic.AddInt64(&m.currentBytes, int64(current))
  	atomic.AddInt64(&m.lastBytes, int64(current))
  
  	if since > time.Second {
  		m.lastAvg = now
  
  		bps := float64(m.lastBytes) / since.Seconds()
  
  		m.avgBytes = (m.avgBytes*float64(m.sampleCount) + bps) / (float64(m.sampleCount) + 1.0)
  
  		atomic.StoreInt64(&m.lastBytes, 0)
  		atomic.AddUint64(&m.sampleCount, 1)
  	}
  
  	m.logBytes(direction, name, read, total)
  }
docs: // TransferBytes increments the number of bytes transferred