simutil

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Logger is the global logger used for simulator.

Functions

func GenerateKeys added in v3.1.0

func GenerateKeys(size int) []string

GenerateKeys generates ordered, unique strings.

func GenerateSplitKey added in v3.1.0

func GenerateSplitKey(start, end []byte) []byte

GenerateSplitKey generate the split key.

func GenerateTableKey added in v3.1.0

func GenerateTableKey(tableID, rowID int64) []byte

GenerateTableKey generates the table key according to the table ID and row ID.

func GenerateTableKeys added in v3.1.0

func GenerateTableKeys(tableCount, size int) []string

GenerateTableKeys generates the table keys according to the table count and size.

func GenerateTiDBEncodedSplitKey added in v3.1.0

func GenerateTiDBEncodedSplitKey(start, end []byte) ([]byte, error)

GenerateTiDBEncodedSplitKey calculates the split key with start and end key, the keys are encoded according to the TiDB encoding rules.

func InitCaseConfig added in v3.1.0

func InitCaseConfig(StoreNum, RegionNum int, EnableTransferRegionCounter bool)

InitCaseConfig is to init caseConfigure

func InitLogger

func InitLogger(l string)

InitLogger initializes the Logger with -log level.

Types

type CaseConfig added in v3.1.0

type CaseConfig struct {
	StoreNum                    int
	RegionNum                   int
	EnableTransferRegionCounter bool
}

CaseConfig is to save flags

var CaseConfigure *CaseConfig

CaseConfigure is an global instance for CaseConfig

Jump to

Keyboard shortcuts

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