scheduler

package
v4.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deadline

type Deadline = runtime.Deadline

type Instrumented

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

Instrumented wraps any runtime scheduler and records scheduling latency.

func NewInstrumented

func NewInstrumented(parseNext Scheduler) *Instrumented

NewInstrumented wraps next. A nil next is allowed and executes callbacks inline.

func (*Instrumented) DevtoolsSection

func (parseS *Instrumented) DevtoolsSection() devtools.ExtensionSection

DevtoolsSection returns a companion devtools section for scheduler telemetry.

func (*Instrumented) RequestIdleCallback

func (parseS *Instrumented) RequestIdleCallback(parseCallback func(Deadline))

func (*Instrumented) SetTimeout

func (parseS *Instrumented) SetTimeout(parseCallback func(), parseDelay int)

func (*Instrumented) Snapshot

func (parseS *Instrumented) Snapshot() Metrics

Snapshot returns the current scheduler metrics.

type Metrics

type Metrics struct {
	IdleScheduled       int
	IdleExecuted        int
	TimeoutScheduled    int
	TimeoutExecuted     int
	InlineFallbacks     int
	LastDelayMs         int
	MaxDelayMs          int
	TotalQueueLatencyNs int64
}

Metrics is a concurrency-safe snapshot of scheduler ergonomics and backpressure.

type Scheduler

type Scheduler = runtime.Scheduler

Jump to

Keyboard shortcuts

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