tools

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_LIST_DISPLAY_COUNT = 6

Variables

View Source
var Cmd = &cobra.Command{Use: "tools", Short: "Developer tools related to substreams"}
View Source
var EmptyStoreError = errors.New("store is empty")
View Source
var Example = func(in string) string {
	return string(cli.Example(in))
}
View Source
var ExamplePrefixed = func(prefix, in string) string {
	return string(cli.ExamplePrefixed(prefix, in))
}

Functions

func ReadAPIToken added in v1.1.1

func ReadAPIToken(cmd *cobra.Command, envFlagName string) string

func StoreStatsE added in v0.1.0

func StoreStatsE(cmd *cobra.Command, args []string) error

Types

type FileInfo added in v0.1.0

type FileInfo struct {
	FileName       string       `json:"name"`
	FileSize       int64        `json:"size_bytes"`
	FileSizeGrowth float64      `json:"size_growth"`
	FileBlockRange *block.Range `json:"block_range"`
}

type KeyStats added in v0.1.0

type KeyStats struct {
	TotalSize   uint64  `json:"total_size_bytes"`
	LargestSize uint64  `json:"largest_size_bytes"`
	AverageSize float64 `json:"average_size_bytes"`
	StdDevSize  float64 `json:"std_dev_size_bytes"`

	Largest string `json:"largest"`
}

type StoreStats added in v0.1.0

type StoreStats struct {
	Name         string `json:"module_name"`
	ModuleHash   string `json:"module_hash"`
	InitialBlock uint64 `json:"module_initial_block"`
	ValueType    string `json:"module_value_type"`
	UpdatePolicy string `json:"module_update_policy"`

	KeysCount uint64 `json:"count"`

	FileInfo   *FileInfo   `json:"file_info,omitempty"`
	KeyStats   *KeyStats   `json:"keys,inline,omitempty"`
	ValueStats *ValueStats `json:"values,inline,omitempty"`
}

type ValueStats added in v0.1.0

type ValueStats struct {
	TotalSize   uint64  `json:"total_size_bytes"`
	LargestSize uint64  `json:"largest_size_bytes"`
	AverageSize float64 `json:"average_size_bytes"`
	StdDevSize  float64 `json:"std_dev_size_bytes"`

	Largest string `json:"largest_value_key"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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