drpcstats

package
v0.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 1 Imported by: 1

README

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.

Documentation

Overview

Package drpcstats contatins types for stat collection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL