Documentation ¶
Index ¶
- Constants
- func NewGitbase(config regression.Config, version string, releases *regression.Releases) *regression.Binary
- func NewToolGitbase() regression.Tool
- type Comparison
- type PromClient
- type Query
- type Result
- type SQLTest
- type Server
- type Test
- func (t *Test) GetResults() bool
- func (t *Test) Prepare() error
- func (t *Test) PrintTabbedResults()
- func (t *Test) RunLoad() error
- func (t *Test) RunQueryCtx(ctx context.Context, gitbaseEnvs map[string]string, query Query) error
- func (t *Test) SaveLatestCSV()
- func (t *Test) StoreLatestToPrometheus(promConfig regression.PromConfig, ciConfig regression.CIConfig) error
Constants ¶
const ( WSeconds = "regression_gitbase_w_avg_seconds" SSeconds = "regression_gitbase_s_avg_seconds" USeconds = "regression_gitbase_u_avg_seconds" MemoryMiB = "regression_gitbase_mem_avg_mib" )
Variables ¶
This section is empty.
Functions ¶
func NewGitbase ¶
func NewGitbase( config regression.Config, version string, releases *regression.Releases, ) *regression.Binary
NewGitbase returns a Binary struct for gitbase Tool.
func NewToolGitbase ¶
func NewToolGitbase() regression.Tool
NewToolGitbase creates a Tool with gitbase parameters filled.
Types ¶
type Comparison ¶
type Comparison struct { regression.Comparison Rows float64 }
Comparison struct holds the percentage difference between two results.
type PromClient ¶ added in v0.3.0
type PromClient struct {
// contains filtered or unexported fields
}
PromClient is the wrapper around pusher that also keeps metrics
func NewPromClient ¶ added in v0.3.0
func NewPromClient(p regression.PromConfig) *PromClient
NewPromClient inits new pusher, creates metrics and adds them to the collector
func (*PromClient) Dump ¶ added in v0.3.0
func (p *PromClient) Dump(res *regression.Result, version, name, branch, commit string) error
Dump does observations and adds metrics to the pusher
type Query ¶
type Query struct { ID string `yaml:"ID"` Name string `yaml:"Name,omitempty"` Statements []string `yaml:"Statements"` }
Query struct has information about on query. It can consist on more than one statement.
type Result ¶
type Result struct { *regression.Result Query Rows int64 }
Result holds the resources and number of rows from a version test.
type SQLTest ¶
SQLTest holds are the queries that belong to a test and connection functionality.
func NewSQLTest ¶
NewSQLTest creates a new SQLTest.
func (*SQLTest) Disconnect ¶
Disconnect closes the mysql connection.
type Server ¶
type Server struct { *regression.Server // contains filtered or unexported fields }
Server wraps a gitbase server instance.
type Test ¶
type Test struct {
// contains filtered or unexported fields
}
Test holds the information about a gitbase test.
func (*Test) GetResults ¶
GetResults prints test results and returns if the tests passed.
func (*Test) PrintTabbedResults ¶ added in v0.1.0
func (t *Test) PrintTabbedResults()
func (*Test) RunQueryCtx ¶ added in v0.3.2
func (*Test) SaveLatestCSV ¶ added in v0.1.0
func (t *Test) SaveLatestCSV()
func (*Test) StoreLatestToPrometheus ¶ added in v0.3.0
func (t *Test) StoreLatestToPrometheus(promConfig regression.PromConfig, ciConfig regression.CIConfig) error
StoreLatestToPrometheus stores latest version results to prometheus pushgateway