vtbench

package
v3.0.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bench

type Bench struct {
	ConnParams ConnParams
	Threads    int
	Count      int
	Query      string

	Rows    *stats.Counter
	Bytes   *stats.Counter
	Timings *stats.Timings

	TotalTime time.Duration
	// contains filtered or unexported fields
}

Bench controls the test

func NewBench

func NewBench(threads, count int, cp ConnParams, query string) *Bench

NewBench creates a new bench test

func (*Bench) Run

func (b *Bench) Run(ctx context.Context) error

Run executes the test

type ClientProtocol

type ClientProtocol int

ClientProtocol indicates how to connect

const (
	// MySQL uses the mysql wire protocol
	MySQL ClientProtocol = iota

	// GRPCVtgate uses the grpc wire protocol to vttablet
	GRPCVtgate

	// GRPCVttablet uses the grpc wire protocol to vttablet
	GRPCVttablet
)

func (ClientProtocol) String

func (cp ClientProtocol) String() string

ProtocolString returns a string representation of the protocol

type ConnParams

type ConnParams struct {
	Hosts      []string
	Port       int
	DB         string
	Username   string
	Password   string
	UnixSocket string
	Protocol   ClientProtocol
}

ConnParams specifies how to connect to the vtgate(s)

Jump to

Keyboard shortcuts

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