Skip to content

Latest commit

 

History

History

drpcstats

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

package drpcstats

import "storj.io/drpc/drpcstats"

Package drpcstats contatins types for stat collection.

Usage

type Stats

type Stats struct {
	Read    uint64
	Written uint64
}

Stats keeps counters of read and written bytes.

func (*Stats) AddRead

func (s *Stats) AddRead(n uint64)

AddRead atomically adds n bytes to the Read counter.

func (*Stats) AddWritten

func (s *Stats) AddWritten(n uint64)

AddWritten atomically adds n bytes to the Written counter.

func (*Stats) AtomicClone

func (s *Stats) AtomicClone() Stats

AtomicClone returns a copy of the stats that is safe to use concurrently with Add methods.