simutil

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 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

func GenerateKeys(size int) []string

GenerateKeys generates ordered, unique strings.

func GenerateSplitKey

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

GenerateSplitKey generate the split key.

func GenerateTableKey

func GenerateTableKey(tableID, rowID int64) []byte

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

func GenerateTableKeys

func GenerateTableKeys(tableCount, size int) []string

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

func GenerateTiDBEncodedSplitKey

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

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

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