benchmark

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BmEchoMixed5

func BmEchoMixed5(db *sql.DB, n int) error

func BmPreparedExec

func BmPreparedExec(db *sql.DB, n int) error

func BmPreparedExecConcurrent1

func BmPreparedExecConcurrent1(db *sql.DB, n int) error

func BmPreparedExecConcurrent16

func BmPreparedExecConcurrent16(db *sql.DB, n int) error

func BmPreparedExecConcurrent2

func BmPreparedExecConcurrent2(db *sql.DB, n int) error

func BmPreparedExecConcurrent4

func BmPreparedExecConcurrent4(db *sql.DB, n int) error

func BmPreparedExecConcurrent8

func BmPreparedExecConcurrent8(db *sql.DB, n int) error

func BmPreparedQueryConcurrent1

func BmPreparedQueryConcurrent1(db *sql.DB, n int) error

func BmPreparedQueryConcurrent16

func BmPreparedQueryConcurrent16(db *sql.DB, n int) error

func BmPreparedQueryConcurrent2

func BmPreparedQueryConcurrent2(db *sql.DB, n int) error

func BmPreparedQueryConcurrent4

func BmPreparedQueryConcurrent4(db *sql.DB, n int) error

func BmPreparedQueryConcurrent8

func BmPreparedQueryConcurrent8(db *sql.DB, n int) error

func BmPreparedQueryRow

func BmPreparedQueryRow(db *sql.DB, n int) error

func BmPreparedQueryRowParam

func BmPreparedQueryRowParam(db *sql.DB, n int) error

func BmSelectLargeBytes

func BmSelectLargeBytes(db *sql.DB, n int) error

func BmSelectLargeRaw

func BmSelectLargeRaw(db *sql.DB, n int) error

func BmSelectLargeString

func BmSelectLargeString(db *sql.DB, n int) error

func BmSelectPreparedLargeBytes

func BmSelectPreparedLargeBytes(db *sql.DB, n int) error

func BmSelectPreparedLargeRaw

func BmSelectPreparedLargeRaw(db *sql.DB, n int) error

func BmSelectPreparedLargeString

func BmSelectPreparedLargeString(db *sql.DB, n int) error

func BmSimpleExec

func BmSimpleExec(db *sql.DB, n int) error

func BmSimpleQueryRow

func BmSimpleQueryRow(db *sql.DB, n int) error

func BmWKBExec

func BmWKBExec(db *sqlx.DB, n int) error

func SetupGeomBench

func SetupGeomBench(db *sqlx.DB, tableParams string) error

func TeardownGeomBench

func TeardownGeomBench(db *sqlx.DB)

func Warmup

func Warmup(db *sqlx.DB) error

Types

type Benchmark

type Benchmark struct {
	Name string
	N    int
	Bm   func(*sqlx.DB, int) error
}

func (*Benchmark) Run

func (b *Benchmark) Run(db *sqlx.DB) BenchmarkResult

type BenchmarkResult

type BenchmarkResult struct {
	Duration time.Duration
	Queries  int
	Allocs   uint64
	Bytes    uint64
	Err      error
}

func (*BenchmarkResult) AllocsPerQuery

func (res *BenchmarkResult) AllocsPerQuery() int

func (*BenchmarkResult) BytesPerQuery

func (res *BenchmarkResult) BytesPerQuery() int

func (*BenchmarkResult) QueriesPerSecond

func (res *BenchmarkResult) QueriesPerSecond() float64

func (BenchmarkResult) String

func (r BenchmarkResult) String() string

type BenchmarkSuite

type BenchmarkSuite struct {
	WarmUp     func(*sqlx.DB) error
	PrintStats bool
}

type BmWKBExecJob

type BmWKBExecJob struct{}

func (*BmWKBExecJob) Run

func (j *BmWKBExecJob) Run(job *progress.Job, input interface{}) (interface{}, error)

func (*BmWKBExecJob) Setup

func (j *BmWKBExecJob) Setup(jobName string, input interface{}) (*progress.Job, error)

Jump to

Keyboard shortcuts

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