Documentation
¶
Overview ¶
Package tpcc implements the five TPC-C transactions as ordered DML steps inside driver transactions with the standard 45/43/4/4/4 mix.
Package tpcc owns Stroppy's TPC-C implementation, tests, and dialect SQL. It runs five transactions as ordered DML steps inside driver transactions, with 45/43/4/4/4 mix, full population, and §1.3.1 validation. PostgreSQL, MySQL, Picodata, and YDB dialect branches are supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( Tx = bench.Test{Name: "tpcc/tx", Define: defineTx, Source: publication("Tx")} Procs = bench.Test{Name: "tpcc/procs", Define: defineProcs, Source: publication("Procs")} )
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct {
Workload string `json:"workload"`
Paced bool `json:"paced"`
SpreadWarehouses bool `json:"spread_warehouses,omitempty"`
ComplianceApplicable bool `json:"compliance_applicable"`
ElapsedSeconds float64 `json:"elapsed_seconds"`
WarmupSeconds float64 `json:"warmup_seconds,omitempty"`
DrainSeconds float64 `json:"drain_seconds,omitempty"`
TpmC float64 `json:"tpm_c"`
MixCompliant *bool `json:"mix_compliant"`
ResponseCompliant *bool `json:"response_compliant"`
MixTolerancePct float64 `json:"mix_tolerance_pct"`
Transactions []TxReport `json:"transactions"`
Statistical Statistical `json:"statistical"`
Steadiness Steadiness `json:"steadiness"`
Note string `json:"note,omitempty"`
}
Report is the machine-readable TPC-C compliance report. Verdict fields that do not apply to the run (unpaced) are nil.
type Statistical ¶
type Statistical struct {
TotalMeasurements uint64 `json:"total_measurements"`
NewOrders uint64 `json:"new_orders"`
Sufficient bool `json:"sufficient"`
Reason string `json:"reason,omitempty"`
}
Statistical reports whether the run observed enough data to support a compliance claim, and why not when it is insufficient.
type Steadiness ¶
type Steadiness struct {
Status string `json:"status"` // "pass", "fail", "insufficient", "not_assessed"
CV float64 `json:"cv"`
Mean float64 `json:"mean_new_orders_per_sec"`
Sigma float64 `json:"sigma_new_orders_per_sec"`
Buckets int `json:"buckets"`
Truncated bool `json:"truncated"`
Reason string `json:"reason,omitempty"`
}
Steadiness is the 3σ steady-state check: the coefficient of variation (CV) of per-window New-Order throughput over the measurement window. Mean and Sigma are New-Orders-per-second; CV = Sigma/Mean.
type TxReport ¶
type TxReport struct {
Name string `json:"name"`
Count uint64 `json:"count"`
Successful uint64 `json:"successful"`
Failed uint64 `json:"failed"`
Canceled uint64 `json:"canceled"`
Drained uint64 `json:"drained"`
MixPercent float64 `json:"mix_percent"`
ThroughputPerSec float64 `json:"throughput_per_sec"`
P50Ms float64 `json:"p50_ms"`
P90Ms float64 `json:"p90_ms"`
P95Ms float64 `json:"p95_ms"`
P99Ms float64 `json:"p99_ms"`
CeilingMs *float64 `json:"ceiling_ms"`
MixMinPercent *float64 `json:"mix_min_percent"`
MixPass *bool `json:"mix_pass"`
ResponsePass *bool `json:"response_pass"`
}
TxReport is the per-transaction-type observation and, when applicable, its verdict against the §5.2.2 mix minimum (with the tolerance already applied) and the §5.2.5 response-time ceiling.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
published
|
|
|
workloadtest
Package workloadtest provides contract assertions for embedded workload assets.
|
Package workloadtest provides contract assertions for embedded workload assets. |