statistics

package
v1.1.0-alpha-8 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxVdiskAggregationDuration defines the maximum aggregation duration
	// used for vdisk operation (average) statistics.
	MaxVdiskAggregationDuration = time.Second * 30
	// MinVdiskAggregationDuration defines the minimum aggregation duration
	// used for vdisk operation (average) statistics.
	MinVdiskAggregationDuration = time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type VdiskLogger

type VdiskLogger interface {
	// LogReadOperation logs a read operation,
	// using it to keep track of the read IOPS and read throughput (in KiB/s).
	LogReadOperation(bytes int64)
	// LogWriteOperation logs a write operation,
	// using it to keep track of the write IOPS and write throughput (in KiB/s).
	LogWriteOperation(bytes int64)

	// Close all open resources and
	// stop all background goroutines linked to this vdiskLogger.
	Close() error
}

VdiskLogger defines an nbd statistics logger interface

func NewVdiskLogger

func NewVdiskLogger(ctx context.Context, configSource config.Source, vdiskID string) (VdiskLogger, error)

NewVdiskLogger creates a new VdiskLogger which tracks the read and write operations of a vdisk for statistics purposes.

Jump to

Keyboard shortcuts

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