throttling

package
v3.19.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package throttling wraps connections to measure throttling.

Index

Constants

View Source
const BytesReceivedCumulativeOperation = "bytes_received_cumulative"

BytesReceivedCumulativeOperation is the operation we set for network events.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sampler

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

Sampler periodically samples the bytes sent and received by a *measurexlite.Trace. The zero value of this structure is invalid; please, construct using NewSampler.

func NewSampler

func NewSampler(tx *measurexlite.Trace) *Sampler

NewSampler attaches a *Sampler to a *measurexlite.Trace, starts sampling in the background and returns the *Sampler. Remember to call *Sampler.Close to stop the background goroutine that performs the sampling.

func (*Sampler) Close

func (smpl *Sampler) Close() error

Close closes the *Sampler. This method is goroutine safe and idempotent.

func (*Sampler) ExtractSamples

func (smpl *Sampler) ExtractSamples() []*model.ArchivalNetworkEvent

ExtractSamples extracts the samples from the *Sampler

Jump to

Keyboard shortcuts

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