import "storj.io/drpc/drpcstats"
Package drpcstats contatins types for stat collection.
type Stats struct {
Read uint64
Written uint64
}
Stats keeps counters of read and written bytes.
func (s *Stats) AddRead(n uint64)
AddRead atomically adds n bytes to the Read counter.
func (s *Stats) AddWritten(n uint64)
AddWritten atomically adds n bytes to the Written counter.
func (s *Stats) AtomicClone() Stats
AtomicClone returns a copy of the stats that is safe to use concurrently with Add methods.