Movatterモバイル変換


[0]ホーム

URL:


drpcstats

package
v0.0.34Latest Latest
Warning

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

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

Details

Repository

github.com/storj/drpc

Links

README

package drpcstats

import "storj.io/drpc/drpcstats"

Package drpcstats contatins types for stat collection.

Usage

type Stats
type Stats struct {Read    uint64Written 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 withAdd 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

typeStats

type Stats struct {Readuint64Writtenuint64}

Stats keeps counters of read and written bytes.

func (*Stats)AddRead

func (s *Stats) AddRead(nuint64)

AddRead atomically adds n bytes to the Read counter.

func (*Stats)AddWritten

func (s *Stats) AddWritten(nuint64)

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.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp