latency

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

README

Latency Attributes

This package defines the data structures for latency predictions and performance tracking.

LatencyPredictionInfo

Contains latency predictions for an endpoint, typically generated by a predictor or extracted from model server metrics.

  • Key: LatencyPredictionInfoDataKey
  • Fields:
    • TTFT: Predicted Time To First Token (ms).
    • TPOT: Predicted Time Per Output Token (ms).
    • TTFTValid: Boolean indicating if TTFT is within SLO.
    • TPOTValid: Boolean indicating if TPOT is within SLO.
    • TTFTHeadroom: TTFT headroom relative to SLO.
    • TPOTHeadroom: TPOT headroom relative to SLO.
    • DispatchedRequestCount: Number of requests dispatched by this EPP instance.

Producers

The following plugins produce this attribute:

  • predicted-latency-producer (Request Control): Uses a sidecar-based machine learning model to generate TTFT and TPOT predictions for each candidate endpoint based on current load and request characteristics.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LatencyPredictionInfoDataKey = plugin.NewDataKey("LatencyPredictionInfoDataKey", latencyproducerconstants.LatencyDataProviderPluginType)

Functions

This section is empty.

Types

type LatencyPredictionInfo

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

LatencyPredictionInfo contains latency predictions for an endpoint

func NewLatencyPredictionInfo

func NewLatencyPredictionInfo(
	ttftValid, tpotValid bool,
	ttftHeadroom, tpotHeadroom float64,
	ttft, tpot float64,
	dispatchedRequestCount int,
) *LatencyPredictionInfo

func (*LatencyPredictionInfo) Clone

Clone implements fwkdl.Cloneable

func (*LatencyPredictionInfo) DispatchedRequestCount

func (l *LatencyPredictionInfo) DispatchedRequestCount() int

func (*LatencyPredictionInfo) IsValid

func (l *LatencyPredictionInfo) IsValid() bool

func (*LatencyPredictionInfo) TPOT

func (l *LatencyPredictionInfo) TPOT() float64

func (*LatencyPredictionInfo) TPOTHeadroom

func (l *LatencyPredictionInfo) TPOTHeadroom() float64

func (*LatencyPredictionInfo) TPOTValid

func (l *LatencyPredictionInfo) TPOTValid() bool

func (*LatencyPredictionInfo) TTFT

func (l *LatencyPredictionInfo) TTFT() float64

func (*LatencyPredictionInfo) TTFTHeadroom

func (l *LatencyPredictionInfo) TTFTHeadroom() float64

func (*LatencyPredictionInfo) TTFTValid

func (l *LatencyPredictionInfo) TTFTValid() bool

Getters

Jump to

Keyboard shortcuts

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