Documentation
¶
Overview ¶
Package metadata collects the reproducibility metadata every full benchmark run must capture (issue #141 "Reproducibility metadata"): enough about the host, toolchain, and run parameters that a published table can be reproduced. "Never publish a table without enough metadata to reproduce it."
Index ¶
Constants ¶
const SchemaVersion = 1
SchemaVersion is bumped when the Metadata shape changes incompatibly.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Metadata ¶
type Metadata struct {
SchemaVersion int `json:"schema_version"`
Timestamp string `json:"timestamp"`
GitCommit string `json:"git_commit"`
// GitDirty is a pointer, not a bool, so the metadata can honestly say "I
// did not determine this" (null) when `git status` failed or git was
// missing — a plain bool's zero value (false = clean) would claim a
// clean tree on the exact runs where the check could not run.
GitDirty *bool `json:"git_dirty"`
OS string `json:"os"`
Kernel string `json:"kernel"`
Arch string `json:"arch"`
CPUModel string `json:"cpu_model"`
LogicalCPUs int `json:"logical_cpus"`
RAMBytes int64 `json:"ram_bytes"`
GoVersion string `json:"go_version"`
DockerVersion string `json:"docker_version"`
DockerComposeVersion string `json:"docker_compose_version"`
PostgresVersion string `json:"postgres_version"`
FrameworkVersions map[string]string `json:"framework_versions"`
RuntimeVersions map[string]string `json:"runtime_versions"`
BenchmarkTool string `json:"benchmark_tool"`
// ResourceLimits is the single scalar the standalone/host-only path records
// (an intended budget). For a multi-app run the authoritative field is
// ResourceLimitsByFramework: the *applied* verdict verified per app (from
// inspect-limits), preserved by merge so a partial/not-applied on one app is
// never overwritten by an enforced on the next. PostgresResourceLimits is the
// database container's verified verdict.
ResourceLimits string `json:"resource_limits"`
ResourceLimitsByFramework map[string]string `json:"resource_limits_by_framework"`
PostgresResourceLimits string `json:"postgres_resource_limits"`
DurationSeconds float64 `json:"duration_seconds"`
WarmupSeconds float64 `json:"warmup_seconds"`
Concurrency []int `json:"concurrency"`
Trials int `json:"trials"`
}
Metadata is the machine-readable run environment (written to results/latest/metadata.json). Discovered fields come from the host and toolchain; the rest are run parameters the orchestrator supplies via Options because they are choices, not facts about the machine.
type Options ¶
type Options struct {
Now func() time.Time
Run Runner
PostgresVersion string
FrameworkVersions map[string]string
RuntimeVersions map[string]string
BenchmarkTool string
ResourceLimits string
ResourceLimitsByFramework map[string]string
PostgresResourceLimits string
DurationSeconds float64
WarmupSeconds float64
Concurrency []int
Trials int
}
Options carries the injectable seams (Now, Run) and the run-parameter fields the orchestrator knows but the host does not.