Documentation ¶
Index ¶
- Constants
- func CalculatePercentile(latencies []time.Duration, percentile float64) time.Duration
- func CreateFile(outputDir string, fileName string) (*os.File, error)
- func ListAllFiles(dir string) ([]string, error)
- func OpenDB(dir string) (dbm.DB, error)
- func PickRandomKVFile(inputKVDir string, processedFiles *sync.Map) string
- func RandomShuffle(kvPairs []KeyValuePair)
- func ReadTree(db dbm.DB, version int, prefix []byte) (*iavl.MutableTree, error)
- func WriteTreeDataToFile(tree *iavl.MutableTree, filenamePattern string, chunkSize int)
- type KeyValuePair
Constants ¶
View Source
const (
DefaultCacheSize int = 10000
)
Variables ¶
This section is empty.
Functions ¶
func CalculatePercentile ¶
NOTE: Assumes latencies is sorted CalculatePercentile calculates latencies percentile
func ListAllFiles ¶
func PickRandomKVFile ¶
Picks random file from input kv dir and updates processedFiles Map with it
func ReadTree ¶
ReadTree loads an iavl tree from the directory If version is 0, load latest, otherwise, load named version The prefix represents which iavl tree you want to read. The iaviwer will always set a prefix.
func WriteTreeDataToFile ¶
func WriteTreeDataToFile(tree *iavl.MutableTree, filenamePattern string, chunkSize int)
Writes raw key / values from a tree to a file Writes a chunkSize number of keys/values to separate files per module
Types ¶
type KeyValuePair ¶
func LoadAndShuffleKV ¶
func LoadAndShuffleKV(inputDir string) ([]KeyValuePair, error)
func ReadKVEntriesFromFile ¶
func ReadKVEntriesFromFile(filename string) ([]KeyValuePair, error)
Reads raw keys / values from a file
Click to show internal directories.
Click to hide internal directories.