statistics

package
v0.10.9 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNO  = 1
	KILO = 1000
	MEGA = 1000 * 1000
	GIGA = 1000 * 1000 * 1000
	TERA = 1000 * 1000 * 1000 * 1000
)

Variables

This section is empty.

Functions

func NewBandwidthStatistics

func NewBandwidthStatistics(output *os.File) *bandwidth

func WithStatistics

func WithStatistics(rwc io.ReadWriteCloser, output *os.File) io.ReadWriteCloser

Types

type BandwidthIO

type BandwidthIO struct {
	// contains filtered or unexported fields
}

func (*BandwidthIO) Close

func (b *BandwidthIO) Close() error

func (*BandwidthIO) Read

func (b *BandwidthIO) Read(p []byte) (n int, err error)

func (*BandwidthIO) Write

func (b *BandwidthIO) Write(p []byte) (n int, err error)

type CompressWrap

type CompressWrap struct {
	// contains filtered or unexported fields
}

func NewCompressWrap

func NewCompressWrap(c compression.Compressor, output *os.File) *CompressWrap

func (*CompressWrap) Compress

func (cw *CompressWrap) Compress(s []byte) (d []byte)

type LatencyStatistics

type LatencyStatistics struct {
	// contains filtered or unexported fields
}

func NewLatencyStatistics

func NewLatencyStatistics(output *os.File) *LatencyStatistics

func (*LatencyStatistics) AddLatency

func (ls *LatencyStatistics) AddLatency(latency time.Duration)

func (*LatencyStatistics) CalcAndPrintLatency

func (ls *LatencyStatistics) CalcAndPrintLatency()

func (*LatencyStatistics) SetOutputFile

func (ls *LatencyStatistics) SetOutputFile(file *os.File)

Jump to

Keyboard shortcuts

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