Help us shape the future of Go! Take the 2026 Go Developer Survey

benchmark

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Overview

Package benchmark runs the opt-in production indexing acceptance harness.

Index

Constants

View Source
const (
	ReportSchemaVersion = 1
	ReportFileName      = "report.json"
	StatusPassed        = "passed"
	StatusFailed        = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifacts

type Artifacts struct {
	OutputDirectory  string `json:"output_directory"`
	Report           string `json:"report"`
	ColdDatabase     string `json:"cold_database"`
	ResumeDatabase   string `json:"resume_database"`
	IsolatedCheckout string `json:"isolated_checkout,omitempty"`
}

type Baseline

type Baseline struct {
	Path          string `json:"path"`
	SchemaVersion int    `json:"schema_version"`
	GrafoCommit   string `json:"grafo_commit"`
}

type Corpus

type Corpus struct {
	Path   string `json:"path"`
	Commit string `json:"commit"`
	Branch string `json:"branch"`
}

type IndexReport

type IndexReport struct {
	Updated               int                    `json:"updated"`
	UpdatedPaths          []string               `json:"updated_paths"`
	ContentChecked        int                    `json:"content_checked"`
	Unchanged             int                    `json:"unchanged"`
	Removed               int                    `json:"removed"`
	RemovedPaths          []string               `json:"removed_paths"`
	Skipped               int                    `json:"skipped"`
	SkippedPaths          []string               `json:"skipped_paths,omitempty"`
	Counts                graph.Counts           `json:"counts"`
	Phases                indexer.PhaseDurations `json:"phases"`
	Writes                graph.WriteStats       `json:"writes"`
	ReconciliationBatches int                    `json:"reconciliation_batches"`
}

type InputCoverage

type InputCoverage struct {
	Tracked          InputStats            `json:"tracked"`
	Supported        InputStats            `json:"supported"`
	Routed           InputStats            `json:"routed"`
	Indexable        InputStats            `json:"indexable"`
	ByLanguage       map[string]InputStats `json:"by_language"`
	Unsupported      InputStats            `json:"unsupported"`
	UnsupportedPaths []string              `json:"unsupported_paths"`
	Skipped          InputStats            `json:"skipped"`
	SkippedPaths     []string              `json:"skipped_paths"`
	SkippedSymlinks  []string              `json:"skipped_symlinks,omitempty"`
}

type InputStats

type InputStats struct {
	Files int   `json:"files"`
	Bytes int64 `json:"bytes"`
}

type OptionalBytes

type OptionalBytes struct {
	Supported bool   `json:"supported"`
	Value     *int64 `json:"bytes"`
	Reason    string `json:"reason,omitempty"`
}

type Options

type Options struct {
	Repository      string
	Output          string
	Baseline        string
	Engine          string
	CleanupDatabase bool
	MaxWALBytes     int64
	MaxRSSBytes     int64
}

type Report

type Report struct {
	SchemaVersion        int              `json:"schema_version"`
	SemanticIndexVersion string           `json:"semantic_index_version"`
	GraphSchemaVersion   int              `json:"graph_schema_version"`
	GrafoVersion         string           `json:"grafo_version"`
	GrafoCommit          string           `json:"grafo_commit"`
	GrafoDirty           bool             `json:"grafo_dirty"`
	Storage              Storage          `json:"storage"`
	GeneratedAt          string           `json:"generated_at"`
	Status               string           `json:"status"`
	Error                string           `json:"error,omitempty"`
	Corpus               Corpus           `json:"corpus"`
	Inputs               InputCoverage    `json:"inputs"`
	Scenarios            []ScenarioReport `json:"scenarios"`
	Artifacts            Artifacts        `json:"artifacts"`
	Baseline             *Baseline        `json:"baseline,omitempty"`
}

func Run

func Run(ctx context.Context, options Options) (report Report, resultErr error)

type ResourceMetrics

type ResourceMetrics struct {
	PeakWALBytes  OptionalBytes `json:"peak_wal"`
	FinalWALBytes OptionalBytes `json:"final_wal"`
	PeakRSSBytes  OptionalBytes `json:"peak_rss"`
	DatabaseBytes OptionalBytes `json:"database_size"`
}

type ScenarioReport

type ScenarioReport struct {
	Name      string          `json:"name"`
	Status    string          `json:"status"`
	Error     string          `json:"error,omitempty"`
	Index     IndexReport     `json:"index"`
	Resources ResourceMetrics `json:"resources"`
}

type Storage

type Storage struct {
	Engine         string `json:"engine"`
	Library        string `json:"library"`
	LibraryVersion string `json:"library_version"`
	Durability     string `json:"durability"`
}

Jump to

Keyboard shortcuts

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