Documentation
¶
Index ¶
- Constants
- func GenerateTempDBName() string
- func Password() string
- func RunCommand(t *testing.T, cmd string, config *Config) error
- func User() string
- type Config
- func (config *Config) Keys() []string
- func (config *Config) Set(name string, value string)
- func (config *Config) SetBool(key string, value bool)
- func (config *Config) SetDBDebug(value bool)
- func (config *Config) SetDBDriver(value string)
- func (config *Config) SetEvents(v int)
- func (config *Config) SetSkipOnError(enabled bool)
- func (config *Config) SetTableSize(v int)
- func (config *Config) SetThreads(v int)
- func (config *Config) SetTime(v int)
- func (config *Config) SkipOnError() bool
- func (config *Config) Value(name string) (string, bool)
Constants ¶
View Source
const ( // https://github.com/akopytov/sysbench ConfigThreads = "threads" ConfigEvents = "events" ConfigTime = "time" ConfigTableSize = "table-size" ConfigDBDriver = "db-driver" ConfigDBDebug = "db-debug" )
View Source
const ( // https://github.com/akopytov/sysbench/tree/master/src/lua OltpDelete = "oltp_delete" OltpInsert = "oltp_insert" OltpReadOnly = "oltp_read_only" OltpReadWrite = "oltp_read_write" OltpUpdateIndex = "oltp_update_index" OltpWriteOnly = "oltp_write_only" OltpCommon = "oltp_common" )
View Source
const ( DefaultTableSize = 10000 DefaultThreads = 1 DefaultEvents = 0 DefaultTime = 10 )
Variables ¶
This section is empty.
Functions ¶
func GenerateTempDBName ¶
func GenerateTempDBName() string
GenerateTempDBName returns a temporary database name.
func RunCommand ¶
RunCommand runs a sysbench command with the given configuration.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents a sysbench configuration.
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a new default config.
func (*Config) SetDBDebug ¶
SetDBDebug sets the database debug.
func (*Config) SetDBDriver ¶
SetDBDriver sets the database driver.
func (*Config) SetSkipOnError ¶ added in v1.6.0
SetSkipOnError sets the skip on error flag.
func (*Config) SetTableSize ¶
SetTableSize sets the table size.
func (*Config) SetThreads ¶
SetThreads sets the number of threads.
func (*Config) SkipOnError ¶ added in v1.6.0
SkipOnError returns true if skip on error is enabled.
Click to show internal directories.
Click to hide internal directories.