Versions in this module Expand all Collapse all v0 v0.40.4 May 19, 2022 Changes in this version + const CsvExt + const CsvFormat + const Dolt + const JsonExt + const JsonFormat + const MySql + const SqlStatsPrefix + var Debug bool + var ErrNoServersDefined = errors.New("servers not defined") + var ErrTestNameNotDefined = errors.New("test name not defined") + var ErrUnableToParseOutput = errors.New("unable to parse output") + var ErrUnsupportedConnectionProtocol = errors.New("unsupported connection protocol") + var ErrUnsupportedHeaderField = errors.New("unsupported header field") + var ResultFileTemplate = "%s_%s_%s_sysbench_performance%s" + func CheckExec(serverConfig *ServerConfig) error + func CheckProtocol(protocol string) error + func CheckUpdatePortMap(serverConfig *ServerConfig, portMap map[int]ServerType) (map[int]ServerType, error) + func ExecCommand(ctx context.Context, name string, arg ...string) *exec.Cmd + func FromHeaderResultColumnValue(h string, r *Result) (string, error) + func FromHeaderResultFieldValue(field string, val string, r *Result) error + func FromResultCsvHeaders() []string + func FromValWithParens(val string) (string, string, error) + func Run(config *Config) error + func SetupDB(ctx context.Context, serverConfig *ServerConfig, databaseName string) (err error) + func UpdateDoltConfig(ctx context.Context, config *ServerConfig) error + func UpdateResult(result *Result, line string) error + func ValidateRequiredFields(server, version, format string) error + func WriteResults(serverConfig *ServerConfig, results Results) error + func WriteResultsCsv(filename string, results Results) (err error) + func WriteResultsJson(filename string, results Results) (err error) + type Config struct + InitBigRepo bool + Runs int + RuntimeGoArch string + RuntimeOS string + ScriptDir string + Servers []*ServerConfig + TestOptions []string + Tests []*ConfigTest + func FromFileConfig(configPath string) (*Config, error) + func NewConfig() *Config + func (c *Config) Validate() error + type ConfigTest struct + FromScript bool + N int + Name string + Options []string + func NewConfigTest(name string, opts []string, fromScript bool) *ConfigTest + func (ct *ConfigTest) GetTests(serverConfig *ServerConfig, testIdFunc func() string) ([]*Test, error) + type Result struct + CreatedAt string + Id string + IgnoredErrorsPerSecond float64 + IgnoredErrorsTotal int64 + LatencyAvgMS float64 + LatencyMaxMS float64 + LatencyMinMS float64 + LatencyPercentile float64 + LatencySumMS float64 + ReconnectsPerSecond float64 + ReconnectsTotal int64 + RuntimeGoArch string + RuntimeOS string + ServerName string + ServerParams string + ServerVersion string + SqlOtherQueries int64 + SqlReadQueries int64 + SqlTotalQueries int64 + SqlTotalQueriesPerSecond float64 + SqlWriteQueries int64 + SuiteId string + TestId string + TestName string + TestParams string + TotalNumberOfEvents int64 + TotalTimeSeconds float64 + TransactionsPerSecond float64 + TransactionsTotal int64 + func FromConfigsNewResult(config *Config, serverConfig *ServerConfig, t *Test, suiteId string, ...) (*Result, error) + func FromOutputResult(output []byte, config *Config, serverConfig *ServerConfig, test *Test, ...) (*Result, error) + func (r *Result) Stamp(stampFunc func() string) + type Results []*Result + func BenchmarkDolt(ctx context.Context, config *Config, serverConfig *ServerConfig) (Results, error) + func BenchmarkMysql(ctx context.Context, config *Config, serverConfig *ServerConfig) (Results, error) + func ReadResultsCsv(filename string) (Results, error) + func ReadResultsJson(filename string) (Results, error) + type ServerConfig struct + ConnectionProtocol string + Host string + Id string + Port int + ResultsFormat string + Server ServerType + ServerArgs []string + ServerExec string + Socket string + Version string + func (sc *ServerConfig) GetId() string + func (sc *ServerConfig) GetServerArgs() []string + type ServerType string + type Test struct + FromScript bool + Name string + Params []string + func GetTests(config *Config, serverConfig *ServerConfig, testIdFunc func() string) ([]*Test, error) + func (t *Test) Cleanup() []string + func (t *Test) Prepare() []string + func (t *Test) Run() []string