simutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 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, file 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