Documentation ¶
Index ¶
- func BenchmarkDolt(ctx context.Context, tppcConfig *TpccBenchmarkConfig, ...) (sysbench_runner.Results, error)
- func BenchmarkMysql(ctx context.Context, config *TpccBenchmarkConfig, ...) (sysbench_runner.Results, error)
- func FromConfigsNewResult(config *TpccBenchmarkConfig, serverConfig *sysbench_runner.ServerConfig, ...) (*sysbench_runner.Result, error)
- func FromOutputResult(output []byte, config *TpccBenchmarkConfig, ...) (*sysbench_runner.Result, error)
- func Run(config *TpccBenchmarkConfig) error
- type TpccBenchmarkConfig
- type TpccTest
- func (t *TpccTest) TpccCleanup(ctx context.Context, serverConfig *sysbench_runner.ServerConfig, ...) *exec.Cmd
- func (t *TpccTest) TpccPrepare(ctx context.Context, serverConfig *sysbench_runner.ServerConfig, ...) *exec.Cmd
- func (t *TpccTest) TpccRun(ctx context.Context, serverConfig *sysbench_runner.ServerConfig, ...) *exec.Cmd
- type TpccTestParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BenchmarkDolt ¶
func BenchmarkDolt(ctx context.Context, tppcConfig *TpccBenchmarkConfig, serverConfig *sysbench_runner.ServerConfig) (sysbench_runner.Results, error)
BenchmarkDolt executes a set of tpcc tests against a dolt server.
func BenchmarkMysql ¶
func BenchmarkMysql(ctx context.Context, config *TpccBenchmarkConfig, serverConfig *sysbench_runner.ServerConfig) (sysbench_runner.Results, error)
BenchmarkMysql benchmarks a mysql server based on the provided configurations.
func FromConfigsNewResult ¶
func FromConfigsNewResult(config *TpccBenchmarkConfig, serverConfig *sysbench_runner.ServerConfig, test *TpccTest, suiteId string, idFunc func() string) (*sysbench_runner.Result, error)
FromConfigsNewResult returns a new result with some fields set based on the provided configs
func FromOutputResult ¶
func FromOutputResult(output []byte, config *TpccBenchmarkConfig, serverConfig *sysbench_runner.ServerConfig, test *TpccTest, suiteId string, idFunc func() string) (*sysbench_runner.Result, error)
FromOutputResult accepts raw sysbench run output and returns the Result
func Run ¶
func Run(config *TpccBenchmarkConfig) error
Types ¶
type TpccBenchmarkConfig ¶
type TpccBenchmarkConfig struct { // RuntimeOS is the platform the benchmarks ran on RuntimeOS string // RuntimeGoArch is the runtime architecture RuntimeGoArch string // ScriptDir represents the location of the TPCC tests ScriptDir string // Servers are the servers to benchmark. Servers []*sysbench_runner.ServerConfig // ScaleFactors represent the scale at which to run each TpccBenchmark at. ScaleFactors []int }
TpccBenchmarkConfig represents a configuration for an execution of the TPCC Benchmark. It executes a series of tests against different ServerConfigurations.
func FromFileConfig ¶
func FromFileConfig(configPath string) (*TpccBenchmarkConfig, error)
FromFileConfig returns a validated Config based on the config file at the configPath
func NewTpccConfig ¶
func NewTpccConfig() *TpccBenchmarkConfig
type TpccTest ¶
type TpccTest struct { // Id represents a unique test id Id string // Name represents the name of the test case Name string // Params are associated parameters this test runs with Params *TpccTestParams }
TpccTest encapsulates an End to End prepare, run, cleanup test case.
func NewTpccTest ¶
func NewTpccTest(name string, params *TpccTestParams) *TpccTest
NewTpccTest instantiates and returns a TPCC test.
func (*TpccTest) TpccCleanup ¶
func (t *TpccTest) TpccCleanup(ctx context.Context, serverConfig *sysbench_runner.ServerConfig, scriptDir string) *exec.Cmd
TpccCleanup prepares the cleanup executable for the Cleanup step.
func (*TpccTest) TpccPrepare ¶
func (t *TpccTest) TpccPrepare(ctx context.Context, serverConfig *sysbench_runner.ServerConfig, scriptDir string) *exec.Cmd
TpccPrepare prepares the command executable for the Prepare step.
func (*TpccTest) TpccRun ¶
func (t *TpccTest) TpccRun(ctx context.Context, serverConfig *sysbench_runner.ServerConfig, scriptDir string) *exec.Cmd
TpccRun prepares the command executable for the Run step.
type TpccTestParams ¶
type TpccTestParams struct { // NumThreads represents the number of threads running queries concurrently. NumThreads int // ScaleFactor represents the number of warehouse to test this at scale. ScaleFactor int // Tables represents the number of tables created per warehouse. Tables int // TrxLevel represents what transaction level to use TrxLevel string // ReportCSV determines whether to report output as a csv. ReportCSV bool // ReportInterval defines how often the tpcc benchmark outputs performance stats. ReportInterval int // Time represents how long Time int }
func NewDefaultTpccParams ¶
func NewDefaultTpccParams() *TpccTestParams
NewDefaultTpccParams returns default TpccTestParams.