Back to godoc.org
github.com/etcd-io/dbtester

Package dbtester

v0.0.0-...-c34a5e7
Latest Go to latest

The latest major version is .

Published: Feb 25, 2020 | License: Apache-2.0 | Module: github.com/etcd-io/dbtester

Index

Variables

var DiskSpaceUsageSummaryColumns = []string{
	"INDEX",
	"DATABASE-ENDPOINT",
	"DISK-SPACE-USAGE",
	"DISK-SPACE-USAGE-BYTES-NUM",
}

DiskSpaceUsageSummaryColumns defines summary columns.

func MakeTag

func MakeTag(desc string) string

MakeTag converts database description to database tag.

type Config

type Config struct {
	TestTitle       string `yaml:"test_title"`
	TestDescription string `yaml:"test_description"`

	dbtesterpb.ConfigClientMachineInitial `yaml:"config_client_machine_initial"`

	AllDatabaseIDList                           []string                                              `yaml:"all_database_id_list"`
	DatabaseIDToConfigClientMachineAgentControl map[string]dbtesterpb.ConfigClientMachineAgentControl `yaml:"datatbase_id_to_config_client_machine_agent_control"`
	DatabaseIDToConfigAnalyzeMachineInitial     map[string]dbtesterpb.ConfigAnalyzeMachineInitial     `yaml:"datatbase_id_to_config_analyze_machine_initial"`

	dbtesterpb.ConfigAnalyzeMachineAllAggregatedOutput `yaml:"analyze_all_aggregated_output"`
	AnalyzePlotPathPrefix                              string                                `yaml:"analyze_plot_path_prefix"`
	AnalyzePlotList                                    []dbtesterpb.ConfigAnalyzeMachinePlot `yaml:"analyze_plot_list"`
	dbtesterpb.ConfigAnalyzeMachineREADME              `yaml:"analyze_readme"`
	// contains filtered or unexported fields
}

Config configures dbtester control clients.

func ReadConfig

func ReadConfig(fpath string, analyze bool) (*Config, error)

ReadConfig reads control configuration file.

func (*Config) BroadcaseRequest

func (cfg *Config) BroadcaseRequest(databaseID string, op dbtesterpb.Operation) (map[int]dbtesterpb.Response, error)

BroadcaseRequest sends request to all endpoints.

func (*Config) SaveDiskSpaceUsageSummary

func (cfg *Config) SaveDiskSpaceUsageSummary(databaseID string, idxToResponse map[int]dbtesterpb.Response) error

SaveDiskSpaceUsageSummary saves data size summary.

func (*Config) Stress

func (cfg *Config) Stress(databaseID string) error

Stress stresses the database.

func (*Config) ToRequest

func (cfg *Config) ToRequest(databaseID string, op dbtesterpb.Operation, idx int) (req *dbtesterpb.Request, err error)

ToRequest converts configuration to 'dbtesterpb.Request'.

func (*Config) UploadToGoogle

func (cfg *Config) UploadToGoogle(databaseID string, targetPath string) error

UploadToGoogle uploads target file to Google Cloud Storage.

func (*Config) WriteREADME

func (cfg *Config) WriteREADME(summary string) error

WriteREADME writes README.

type CumulativeKeyNumAndOtherData

type CumulativeKeyNumAndOtherData struct {
	UnixSecond int64
	Throughput int64

	CumulativeKeyNum int64

	MinMemoryMB float64
	AvgMemoryMB float64
	MaxMemoryMB float64

	AvgReadBytesDelta  float64
	AvgWriteBytesDelta float64
}

CumulativeKeyNumAndOtherData wraps the cumulative number of keys and according memory data. So the higher 'CumulativeKeyNum' is, the later the data points are in the time series.

type CumulativeKeyNumAndOtherDataByUnixSecond

type CumulativeKeyNumAndOtherDataByUnixSecond []CumulativeKeyNumAndOtherData

CumulativeKeyNumAndOtherDataByUnixSecond is a slice of CumulativeKeyNumAndOtherData to sort by UnixSecond.

func (CumulativeKeyNumAndOtherDataByUnixSecond) Len

func (t CumulativeKeyNumAndOtherDataByUnixSecond) Len() int

func (CumulativeKeyNumAndOtherDataByUnixSecond) Less

func (t CumulativeKeyNumAndOtherDataByUnixSecond) Less(i, j int) bool

func (CumulativeKeyNumAndOtherDataByUnixSecond) Swap

func (t CumulativeKeyNumAndOtherDataByUnixSecond) Swap(i, j int)

type CumulativeKeyNumAndOtherDataSlice

type CumulativeKeyNumAndOtherDataSlice []CumulativeKeyNumAndOtherData

CumulativeKeyNumAndOtherDataSlice is a slice of CumulativeKeyNumAndOtherData to sort by CumulativeKeyNum.

func FindRangesData

func FindRangesData(data []CumulativeKeyNumAndOtherData, unit int64, totalRequests int64) CumulativeKeyNumAndOtherDataSlice

FindRangesData sorts all data points by its timestamp. And then aggregate by the cumulative throughput, in order to map the number of keys to the average memory usage.

func (CumulativeKeyNumAndOtherDataSlice) Len

func (t CumulativeKeyNumAndOtherDataSlice) Len() int

func (CumulativeKeyNumAndOtherDataSlice) Less

func (t CumulativeKeyNumAndOtherDataSlice) Less(i, j int) bool

func (CumulativeKeyNumAndOtherDataSlice) Swap

func (t CumulativeKeyNumAndOtherDataSlice) Swap(i, j int)

type CumulativeKeyNumToAvgLatency

type CumulativeKeyNumToAvgLatency struct {
	CumulativeKeyNum int64

	MinLatency time.Duration
	AvgLatency time.Duration
	MaxLatency time.Duration
}

CumulativeKeyNumToAvgLatency wraps the cumulative number of keys and according latency data. So the higher 'CumulativeKeyNum' is, the later the data points are in the time series.

type CumulativeKeyNumToAvgLatencySlice

type CumulativeKeyNumToAvgLatencySlice []CumulativeKeyNumToAvgLatency

CumulativeKeyNumToAvgLatencySlice is a slice of CumulativeKeyNumToAvgLatency to sort by CumulativeKeyNum.

func FindRangesLatency

func FindRangesLatency(data report.TimeSeries, unit int64, totalRequests int64) CumulativeKeyNumToAvgLatencySlice

FindRangesLatency sorts all data points by its timestamp. And then aggregate by the cumulative throughput, in order to map the number of keys to the average latency.

type DataPoint struct {
	Timestamp  int64
	MinLatency time.Duration
	AvgLatency time.Duration
	MaxLatency time.Duration
	ThroughPut int64
}

If unit is 1000 and the average throughput per second is 30,000 and its average latency is 10ms, it will have 30 data points with latency 10ms.

func (CumulativeKeyNumToAvgLatencySlice) Len

func (t CumulativeKeyNumToAvgLatencySlice) Len() int

func (CumulativeKeyNumToAvgLatencySlice) Less

func (t CumulativeKeyNumToAvgLatencySlice) Less(i, j int) bool

func (CumulativeKeyNumToAvgLatencySlice) Swap

func (t CumulativeKeyNumToAvgLatencySlice) Swap(i, j int)

type ReqHandler

type ReqHandler func(ctx context.Context, req *request) error

ReqHandler wraps request handler.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier