databases

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cassandra

type Cassandra struct {
	// contains filtered or unexported fields
}

Cassandra implements the bencher interface.

func NewCassandra

func NewCassandra(host string, port int, user, password string) *Cassandra

NewCassandra returns a new cassandra bencher.

func (*Cassandra) Benchmarks

func (c *Cassandra) Benchmarks() []benchmark.Benchmark

Benchmarks returns the individual benchmark functions for the cassandra db. TODO: update is not like other db statements balance = balance + balance!

func (*Cassandra) Cleanup

func (c *Cassandra) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*Cassandra) Exec

func (c *Cassandra) Exec(stmt string)

Exec executes the given statement on the database.

func (*Cassandra) Setup

func (c *Cassandra) Setup()

Setup initializes the database for the benchmark.

type Cockroach

type Cockroach struct {
	// contains filtered or unexported fields
}

Cockroach implements the bencher interface.

func NewCockroach

func NewCockroach(host string, port int, user, password string, maxOpenConns int) *Cockroach

NewCockroach returns a new cockroach bencher.

func (*Cockroach) Benchmarks

func (p *Cockroach) Benchmarks() []benchmark.Benchmark

Benchmarks returns the individual benchmark functions for the cockroach db.

func (*Cockroach) Cleanup

func (p *Cockroach) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*Cockroach) Exec

func (p *Cockroach) Exec(stmt string)

Exec executes the given statement on the database.

func (*Cockroach) Setup

func (p *Cockroach) Setup()

Setup initializes the database for the benchmark.

type MSSQL added in v0.5.0

type MSSQL struct {
	// contains filtered or unexported fields
}

MSSQL implements the bencher interface.

func NewMSSQL added in v0.5.0

func NewMSSQL(host string, port int, user, password string, maxOpenConns int) *MSSQL

NewMSSQL returns a new MS SQL bencher.

func (*MSSQL) Benchmarks added in v0.5.0

func (m *MSSQL) Benchmarks() []benchmark.Benchmark

Benchmarks returns the individual benchmark functions for the mysql db.

func (*MSSQL) Cleanup added in v0.5.0

func (m *MSSQL) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*MSSQL) Exec added in v0.5.0

func (m *MSSQL) Exec(stmt string)

Exec executes the given statement on the database.

func (*MSSQL) Setup added in v0.5.0

func (m *MSSQL) Setup()

Setup initializes the database for the benchmark.

type Mysql

type Mysql struct {
	// contains filtered or unexported fields
}

Mysql implements the bencher interface.

func NewMySQL

func NewMySQL(host string, port int, user, password string, maxOpenConns int) *Mysql

NewMySQL returns a new mysql bencher.

func (*Mysql) Benchmarks

func (m *Mysql) Benchmarks() []benchmark.Benchmark

Benchmarks returns the individual benchmark functions for the mysql db.

func (*Mysql) Cleanup

func (m *Mysql) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*Mysql) Exec

func (m *Mysql) Exec(stmt string)

Exec executes the given statement on the database.

func (*Mysql) Setup

func (m *Mysql) Setup()

Setup initializes the database for the benchmark.

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

Postgres implements the bencher interface.

func NewPostgres

func NewPostgres(host string, port int, user, password string, maxOpenConns int) *Postgres

NewPostgres returns a new postgres bencher.

func (*Postgres) Benchmarks

func (p *Postgres) Benchmarks() []benchmark.Benchmark

Benchmarks returns the individual benchmark statements for the postgres db.

func (*Postgres) Cleanup

func (p *Postgres) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*Postgres) Exec

func (p *Postgres) Exec(stmt string)

Exec executes the given statement on the database.

func (*Postgres) Setup

func (p *Postgres) Setup()

Setup initializes the database for the benchmark.

type SQLite

type SQLite struct {
	// contains filtered or unexported fields
}

SQLite implements the bencher interface.

func NewSQLite

func NewSQLite(path string) *SQLite

NewSQLite retruns a new SQLite bencher.

func (*SQLite) Benchmarks

func (m *SQLite) Benchmarks() []benchmark.Benchmark

Benchmarks returns the individual benchmark statements for sqlite.

func (*SQLite) Cleanup

func (m *SQLite) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*SQLite) Exec

func (m *SQLite) Exec(stmt string)

Exec executes the given statement on the database.

func (*SQLite) Setup

func (m *SQLite) Setup()

Setup initializes the database for the benchmark.

type Spanner added in v0.6.3

type Spanner struct {
	// contains filtered or unexported fields
}

Spanner implements the bencher interface.

func NewSpanner added in v0.6.3

func NewSpanner(projectID, instanceID, databaseID, gcpCredentialsFile string) *Spanner

NewSpanner returns a new Google Cloud Spanner bencher.

spannerDatabase - A valid database name has the form projects/PROJECT_ID/instances/INSTANCE_ID/databases/DATABASE_ID. gcpCredentialsFile - Optional, path to file with needed GCP credentials to access Spanner. If left blank, the default behavior of gcp libraries will be used, by assuming GOOGLE_APPLICATION_CREDENTIALS is set to the correct path

func (*Spanner) Benchmarks added in v0.6.3

func (s *Spanner) Benchmarks() (bb []benchmark.Benchmark)

Benchmarks returns the individual benchmark functions for tspanner (not implemented).

func (*Spanner) Cleanup added in v0.6.3

func (s *Spanner) Cleanup()

Cleanup removes all remaining benchmarking data.

func (*Spanner) Exec added in v0.6.3

func (s *Spanner) Exec(stmt string)

Exec executes the given statement on the database.

func (*Spanner) Setup added in v0.6.3

func (s *Spanner) Setup()

Setup initializes the database for the benchmark.

Jump to

Keyboard shortcuts

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