helper

package
v0.0.0-...-9d83beb Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TrimThreshold = 1000

TrimThreshold is the min count of keys to enable trim

Functions

func CmdLinesToResp

func CmdLinesToResp(cmds []CmdLine) []byte

CmdLinesToResp convert []CmdLine to RESP bytes

func FindBiggestKeys

func FindBiggestKeys(rdbFilename string, topN int, output *os.File, options ...interface{}) error

FindBiggestKeys read rdb file and find the largest N keys. The invoker owns output, FindBiggestKeys won't close it

func FlameGraph

func FlameGraph(rdbFilename string, port int, separators []string, options ...interface{}) (chan<- struct{}, error)

FlameGraph draws flamegraph in web page to analysis memory usage pattern

func MemoryProfile

func MemoryProfile(rdbFilename string, csvFilename string, options ...interface{}) error

MemoryProfile read rdb file and analysis memory usage then write result to csv file

func ToAOF

func ToAOF(rdbFilename string, aofFilename string, options ...interface{}) error

ToAOF read rdb file and convert to aof file (Redis Serialization )

func ToJsons

func ToJsons(rdbFilename string, jsonFilename string, options ...interface{}) error

ToJsons read rdb file and convert to json file

func WriteObjectToResp

func WriteObjectToResp(w io.Writer, obj model.RedisObject) error

WriteObjectToResp convert object to resp and write

Types

type CmdLine

type CmdLine = [][]byte

CmdLine is alias for [][]byte, represents a command line

func ObjectToCmd

func ObjectToCmd(obj model.RedisObject, opts ...interface{}) []CmdLine

ObjectToCmd convert redis object to redis command line

type NoExpiredOption

type NoExpiredOption bool

NoExpiredOption tells decoder to filter all expired keys

func WithNoExpiredOption

func WithNoExpiredOption() NoExpiredOption

WithNoExpiredOption tells decoder to filter all expired keys

type RegexOption

type RegexOption *string

RegexOption enable regex filters

func WithRegexOption

func WithRegexOption(expr string) RegexOption

WithRegexOption creates a WithRegexOption from regex expression

Jump to

Keyboard shortcuts

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