Documentation ¶
Index ¶
- func CreateAndConnect(pgURL url.URL, name string) (*gosql.DB, error)
- func ExecPgbench(pgURL url.URL, dbname string, count int) (*exec.Cmd, error)
- func RunOne(db *gosql.DB, r *rand.Rand, accounts int) error
- func SetupBenchDB(db *gosql.DB, accounts int, quiet bool) error
- func SetupExec(pgURL url.URL, name string, accounts, transactions int) (*exec.Cmd, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAndConnect ¶
CreateAndConnect connects and creates the requested DB (dropping if exists) then returns a new connection to the created DB.
func ExecPgbench ¶
ExecPgbench returns a ready-to-run pgbench Cmd, that will run against the db specified by `pgURL`.
func SetupBenchDB ¶
SetupBenchDB sets up a db with the schema and initial data used by `pgbench`. The `-i` flag to `pgbench` is usually used to do this when testing postgres but the statements it generates use postgres-specific flags that cockroach does not support. The queries this script runs are based on a dump of a db created by `pgbench -i`, but sticking to the compatible subset that both cockroach and postgres support.
Types ¶
This section is empty.