Documentation
¶
Index ¶
- func HasFailures(doc Document) bool
- func WriteCompare(w io.Writer, docs []Document) error
- func WriteConsole(w io.Writer, doc Document) error
- func WriteHTML(w io.Writer, doc Document) error
- func WriteJSON(w io.Writer, doc Document) error
- type Document
- type ExtensionsSection
- type ResultEntry
- type ResultsSection
- type RunConfig
- type WorkloadEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasFailures ¶
HasFailures reports whether a document has no workloads or any workload failed.
func WriteCompare ¶
WriteCompare writes a side-by-side comparison of two or more reports.
func WriteConsole ¶
WriteConsole writes a human-readable summary to w.
Types ¶
type Document ¶
type Document struct {
SchemaVersion int `json:"schema_version"`
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
System sysinfo.SystemInfo `json:"system"`
Config RunConfig `json:"config"`
Results ResultsSection `json:"results"`
Extensions ExtensionsSection `json:"extensions,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
Document is the full report representation shared by JSON and HTML outputs.
func BuildDocument ¶
func BuildDocument(version string, system sysinfo.SystemInfo, cfg RunConfig, results []bench.BenchResult, warnings []string) Document
BuildDocument converts benchmark results into a report document.
type ExtensionsSection ¶
type ExtensionsSection struct {
Workloads []WorkloadEntry `json:"workloads,omitempty"`
}
ExtensionsSection stores optional extension workloads.
type ResultEntry ¶
type ResultEntry struct {
Iterations int `json:"iterations,omitempty"`
MedianMS float64 `json:"median_ms"`
SamplesMS []float64 `json:"samples_ms,omitempty"`
ThroughputPerSec float64 `json:"throughput_per_sec"`
ThroughputUnit string `json:"throughput_unit"`
AvgNSPerAccess float64 `json:"avg_ns_per_access,omitempty"`
BytesProcessed int64 `json:"bytes_processed,omitempty"`
OpsProcessed float64 `json:"ops_processed,omitempty"`
Detail string `json:"detail,omitempty"`
Error string `json:"error,omitempty"`
}
ResultEntry stores one workload result inside a report document.
type ResultsSection ¶
type ResultsSection struct {
Workloads []WorkloadEntry `json:"workloads"`
}
ResultsSection stores benchmark workload results without synthetic scoring.
type RunConfig ¶
type RunConfig struct {
Iterations int `json:"iterations"`
Filter string `json:"filter,omitempty"`
DiskPath string `json:"disk_path,omitempty"`
Extensions bool `json:"extensions"`
Mode string `json:"mode,omitempty"`
Scope string `json:"scope,omitempty"`
HardwareTools []string `json:"hardware_tools,omitempty"`
IperfHosts []string `json:"iperf_hosts,omitempty"`
CatalogSource string `json:"catalog_source,omitempty"`
CatalogRevision string `json:"catalog_revision,omitempty"`
NodeIDs []string `json:"node_ids,omitempty"`
}
RunConfig describes the CLI configuration used to produce a report.
type WorkloadEntry ¶
type WorkloadEntry struct {
Name string `json:"name"`
Category string `json:"category"`
Description string `json:"description"`
Result *ResultEntry `json:"result,omitempty"`
}
WorkloadEntry stores one workload report row.