benchmarks

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderDriftNote

func RenderDriftNote(parseReport BenchmarkReport) string

Types

type BenchmarkBucketScore

type BenchmarkBucketScore struct {
	ID                string  `json:"id"`
	Label             string  `json:"label"`
	MatchedBenchmarks int     `json:"matchedBenchmarks"`
	Score             float64 `json:"score"`
}

type BenchmarkComparisonSummary

type BenchmarkComparisonSummary struct {
	BaselineGeneratedAt string                      `json:"baselineGeneratedAt,omitempty"`
	TolerancePct        float64                     `json:"tolerancePct"`
	MatchedMetrics      int                         `json:"matchedMetrics"`
	Improved            int                         `json:"improved"`
	Regressed           int                         `json:"regressed"`
	Unchanged           int                         `json:"unchanged"`
	Entries             []BenchmarkMetricComparison `json:"entries,omitempty"`
}

type BenchmarkMetricComparison

type BenchmarkMetricComparison struct {
	Lane      string  `json:"lane"`
	Package   string  `json:"package"`
	Benchmark string  `json:"benchmark"`
	Metric    string  `json:"metric"`
	Baseline  float64 `json:"baseline"`
	Current   float64 `json:"current"`
	Delta     float64 `json:"delta"`
	DeltaPct  float64 `json:"deltaPct"`
	Direction string  `json:"direction"`
}

type BenchmarkReport

type BenchmarkReport struct {
	OK                 bool                        `json:"ok"`
	Root               string                      `json:"root"`
	GeneratedAt        string                      `json:"generatedAt"`
	GoVersion          string                      `json:"goVersion"`
	GOOS               string                      `json:"goos"`
	GOARCH             string                      `json:"goarch"`
	SelectedLanes      []string                    `json:"selectedLanes"`
	Bench              string                      `json:"bench"`
	Count              int                         `json:"count"`
	PackageParallelism int                         `json:"packageParallelism"`
	ReportPath         string                      `json:"reportPath"`
	PackageCount       int                         `json:"packageCount"`
	BenchmarkCount     int                         `json:"benchmarkCount"`
	FailedPackages     int                         `json:"failedPackages"`
	Scores             *BenchmarkScoreSummary      `json:"scores,omitempty"`
	Comparison         *BenchmarkComparisonSummary `json:"comparison,omitempty"`
}

func LoadReport

func LoadReport(parsePath string) (BenchmarkReport, error)

type BenchmarkScoreSummary

type BenchmarkScoreSummary struct {
	Method               string                 `json:"method"`
	ReferencePath        string                 `json:"referencePath"`
	ReferenceGeneratedAt string                 `json:"referenceGeneratedAt"`
	ReferenceMachine     string                 `json:"referenceMachine"`
	MatchedBenchmarks    int                    `json:"matchedBenchmarks"`
	OverallScore         float64                `json:"overallScore"`
	Buckets              []BenchmarkBucketScore `json:"buckets"`
}

Jump to

Keyboard shortcuts

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