plan

package
v0.0.0-...-f3ed82d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2019 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plan

type Plan struct {
	// DriverName is the name of the sql driver.
	// Supported drivers:
	// - postgres : https://github.com/lib/pq
	// - pgx : https://github.com/jackc/pgx
	// - mymysql: https://github.com/ziutek/mymysql
	// - mysql: https://github.com/go-sql-driver/mysql
	DriverName string `yaml:"driver_name"`

	// DataSourceName is data source or connection string of the database
	// being tested
	DataSourceName string `yaml:"data_source_name"`

	// NumWorker is number of goroutines which executes the benchmarked queries.
	// It simulates number of concurrent queries in our system
	NumWorker int `yaml:"num_worker"`

	// MaxOpenConns define the maximum number of open connections to the database.
	// The benchmarker will call https://golang.org/pkg/database/sql/#DB.SetMaxOpenConns
	// with this field as the argument
	MaxOpenConns int `yaml:"max_open_conns"`

	// Queries is sequence of queries we want to test
	Queries []query.Query `yaml:"queries"`
}

Plan define the gosqlbencher benchmark plan

func Read

func Read(filename string) (p Plan, err error)

Read reads and parse Plan from the given filename

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL