dbtester: go.etcd.io/dbtester Index | Files

package dbtester

import "go.etcd.io/dbtester"

Index

Package Files

broadcast_request.go config_dbtester.go find_ranges.go readme.go report.go report_save_upload.go stress.go stress_client.go stress_client_consul.go stress_client_etcdv3.go stress_client_zookeeper.go util.go

Variables

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

DiskSpaceUsageSummaryColumns defines summary columns.

func MakeTag Uses

func MakeTag(desc string) string

MakeTag converts database description to database tag.

type Config Uses

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 Uses

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

ReadConfig reads control configuration file.

func (*Config) BroadcaseRequest Uses

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

BroadcaseRequest sends request to all endpoints.

func (*Config) SaveDiskSpaceUsageSummary Uses

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

SaveDiskSpaceUsageSummary saves data size summary.

func (*Config) Stress Uses

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

Stress stresses the database.

func (*Config) ToRequest Uses

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 Uses

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

UploadToGoogle uploads target file to Google Cloud Storage.

func (*Config) WriteREADME Uses

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

WriteREADME writes README.

type CumulativeKeyNumAndOtherData Uses

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 Uses

type CumulativeKeyNumAndOtherDataByUnixSecond []CumulativeKeyNumAndOtherData

CumulativeKeyNumAndOtherDataByUnixSecond is a slice of CumulativeKeyNumAndOtherData to sort by UnixSecond.

func (CumulativeKeyNumAndOtherDataByUnixSecond) Len Uses

func (t CumulativeKeyNumAndOtherDataByUnixSecond) Len() int

func (CumulativeKeyNumAndOtherDataByUnixSecond) Less Uses

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

func (CumulativeKeyNumAndOtherDataByUnixSecond) Swap Uses

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

type CumulativeKeyNumAndOtherDataSlice Uses

type CumulativeKeyNumAndOtherDataSlice []CumulativeKeyNumAndOtherData

CumulativeKeyNumAndOtherDataSlice is a slice of CumulativeKeyNumAndOtherData to sort by CumulativeKeyNum.

func FindRangesData Uses

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 Uses

func (t CumulativeKeyNumAndOtherDataSlice) Len() int

func (CumulativeKeyNumAndOtherDataSlice) Less Uses

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

func (CumulativeKeyNumAndOtherDataSlice) Swap Uses

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

type CumulativeKeyNumToAvgLatency Uses

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 Uses

type CumulativeKeyNumToAvgLatencySlice []CumulativeKeyNumToAvgLatency

CumulativeKeyNumToAvgLatencySlice is a slice of CumulativeKeyNumToAvgLatency to sort by CumulativeKeyNum.

func FindRangesLatency Uses

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 Uses

func (t CumulativeKeyNumToAvgLatencySlice) Len() int

func (CumulativeKeyNumToAvgLatencySlice) Less Uses

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

func (CumulativeKeyNumToAvgLatencySlice) Swap Uses

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

type ReqHandler Uses

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

ReqHandler wraps request handler.

Package dbtester imports 31 packages (graph). Updated 2018-09-18. Refresh now. Tools for package owners.