measurer

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

The measurer package provides functions to periodically read kernel metrics for a given network connection and return them over a channel wrapped in an throughput1 Measurement object.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Throughput1Measurer added in v0.4.1

type Throughput1Measurer struct {

	// ReadChan is a readable channel for measurements created by the measurer.
	ReadChan <-chan model.Measurement
	// contains filtered or unexported fields
}

Throughput1Measurer tracks state for collecting connection measurements.

func New added in v0.4.1

func New() *Throughput1Measurer

New creates an empty Throughput1Measurer. The measurer must be started with Start.

func (*Throughput1Measurer) Measure added in v0.4.1

Measure collects metrics about the life of the connection.

func (*Throughput1Measurer) Start added in v0.4.1

func (m *Throughput1Measurer) Start(ctx context.Context, conn net.Conn) <-chan model.Measurement

Start starts a measurer goroutine that periodically reads the tcp_info and bbr_info kernel structs for the connection, if available, and sends them wrapped in a Measurement over the returned channel.

The context determines the measurer goroutine's lifetime. If passed a connection that is not a netx.Conn, this function will panic.

Jump to

Keyboard shortcuts

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