throughput

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package throughput decides optional growth from aggregate application progress. It owns no connection, timer, byte buffer or recovery allowance.

Index

Constants

View Source
const (
	SampleInterval    = time.Second
	ObservationWindow = 3 * time.Second
	FailureBackoff    = 15 * time.Second

	IdleRetention      = 10 * time.Second
	MinimumUsefulGain  = 1.10
	MinimumOutputGain  = 1.05
	MinimumOutputRatio = 0.65
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string
const (
	Hold    Action = "hold"
	Explore Action = "explore"
	Sample  Action = "sample"
	Settle  Action = "settle"
	Retire  Action = "retire"
	Keep    Action = "keep"
	Abandon Action = "abandon"
)

type Controller

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

func (*Controller) Step

func (c *Controller) Step(now time.Time, o Observation, maximumPaths int) Decision

Step consumes scheduling facts for exact path generations. The caller owns connection creation and sampling grants, keeping this policy deterministic.

type Decision

type Decision struct {
	Action                                 Action
	Reason                                 string
	Path                                   PathIdentity
	Work                                   lanescheduling.SamplingEvidence
	RetryAfter                             time.Duration
	UsefulRate, OutputRate                 float64
	BaselineUsefulRate, BaselineOutputRate float64
}

type Observation

type Observation struct {
	InFlightBytes                                      uint64
	QueuedBytes, UnfinishedBytes, CapacityWaitingBytes uint64
	NetworkWaitingBytes                                uint64
	UsefulBytes, OutputBytes, RemainingBytes           uint64
	RemainingKnown                                     bool
	Paths                                              []PathObservation
	Pending                                            bool
}

type PathIdentity

type PathIdentity struct {
	PathID    string
	LaneID    uint32
	LaneEpoch uint32
}

type PathObservation

type PathObservation struct {
	Identity PathIdentity
	Optional bool
	Work     lanescheduling.SamplingEvidence
}

Jump to

Keyboard shortcuts

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