displaybench

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 19 Imported by: 0 modules, 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 displaybench measures the real engine/SDK display path on loopback It deliberately imports no official plugin or operating-system action adapter

Scenario fixtures extend correctness coverage without changing the v1 displaybench contract

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Latency

type Latency struct {
	P50 float64 `json:"p50"`
	P95 float64 `json:"p95"`
	P99 float64 `json:"p99"`
}

type Options

type Options struct{ Frames, Surfaces int }

func (Options) Validate

func (o Options) Validate() error

Validate benchmark dimensions and work limits

type Report

type Report struct {
	SchemaVersion                int      `json:"schema_version"`
	FixtureVersion               string   `json:"fixture_version"`
	SourceRevision               string   `json:"source_revision"`
	SourceDirty                  string   `json:"source_dirty"`
	MeasurementScope             string   `json:"measurement_scope"`
	Surfaces                     int      `json:"surfaces"`
	Frames                       int      `json:"frames"`
	Emitted                      uint64   `json:"emitted"`
	Received                     uint64   `json:"received"`
	PayloadBytes                 uint64   `json:"payload_bytes"`
	DisplayRevisions             uint64   `json:"display_revisions"`
	DuplicateRevisionsSuppressed uint64   `json:"duplicate_revisions_suppressed"`
	StartupMS                    float64  `json:"startup_ms"`
	ElapsedMS                    float64  `json:"elapsed_ms"`
	ThroughputPerSecond          float64  `json:"throughput_per_second"`
	LatencyMS                    Latency  `json:"latency_ms"`
	OS                           string   `json:"os"`
	Arch                         string   `json:"arch"`
	GoVersion                    string   `json:"go_version"`
	Limitations                  []string `json:"limitations"`
}

func Run

func Run(parent context.Context, options Options, sourceRevision, sourceDirty string) (Report, error)

Run caps the entire operation at 60 seconds and keeps only 1200 latency samples. The loopback peer acknowledges each frame before producing another this measures bounded round-trip display delivery, not unconstrained saturation

type ScenarioCell

type ScenarioCell struct {
	Name      string  `json:"name"`
	Requests  int     `json:"requests"`
	Events    uint64  `json:"events"`
	LatencyMS Latency `json:"latency_ms"`
}

type ScenarioOptions

type ScenarioOptions struct {
	Cycles   int
	Surfaces int
}

func (ScenarioOptions) Validate

func (o ScenarioOptions) Validate() error

Validate lifecycle benchmark options

type ScenarioReport

type ScenarioReport struct {
	SchemaVersion       int             `json:"schema_version"`
	FixtureVersion      string          `json:"fixture_version"`
	MeasurementScope    string          `json:"measurement_scope"`
	SourceRevision      string          `json:"source_revision"`
	SourceDirty         string          `json:"source_dirty"`
	OS                  string          `json:"os"`
	Arch                string          `json:"arch"`
	GoVersion           string          `json:"go_version"`
	Cycles              int             `json:"cycles"`
	Surfaces            int             `json:"surfaces"`
	EngineInstances     int             `json:"engine_instances"`
	Received            uint64          `json:"received"`
	Expected            uint64          `json:"expected"`
	PayloadBytes        uint64          `json:"payload_bytes"`
	StartupMS           float64         `json:"startup_ms"`
	ElapsedMS           float64         `json:"elapsed_ms"`
	ThroughputPerSecond float64         `json:"throughput_per_second"`
	Scenarios           []ScenarioCell  `json:"scenarios"`
	FirstCycle          []ScenarioTrace `json:"first_cycle"`
	TranscriptSHA256    string          `json:"transcript_sha256"`
	Limitations         []string        `json:"limitations"`
}

func RunScenarios

func RunScenarios(parent context.Context, options ScenarioOptions, sourceRevision, sourceDirty string) (ScenarioReport, error)

Run the lifecycle and display-diff benchmark

type ScenarioTrace

type ScenarioTrace struct {
	Step      string      `json:"step"`
	Lifecycle []sdk.Event `json:"lifecycle,omitempty"`
	Events    []sdk.Event `json:"events"`
}

Jump to

Keyboard shortcuts

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