benchmarking

package
v0.0.3-rc-1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitDb

func CommitDb()

func CurrentTime

func CurrentTime() int64

func DbReadCount

func DbReadCount() int32

func DbWriteCount

func DbWriteCount() int32

func ResetReadWriteCount

func ResetReadWriteCount()

func RestoreSnapshotDb

func RestoreSnapshotDb()

func SetWhitelist

func SetWhitelist(key []byte)

func StartDbTracker

func StartDbTracker()

func StopDbTracker

func StopDbTracker()

func StoreSnapshotDb

func StoreSnapshotDb()

func WipeDb

func WipeDb()

Types

type BenchmarkConfig

type BenchmarkConfig struct {

	// The encoded name of the benchmark/extrinsic to run.
	Benchmark sc.Sequence[sc.U8]

	Origin types.RawOrigin

	// Number of times to repeat benchmark within the Wasm environment. (versus in the client)
	InternalRepeats sc.U32
}

Configuration used to setup and run runtime benchmarks.

func DecodeBenchmarkConfig

func DecodeBenchmarkConfig(buffer *bytes.Buffer) (BenchmarkConfig, error)

func (BenchmarkConfig) Bytes

func (bc BenchmarkConfig) Bytes() []byte

func (BenchmarkConfig) Encode

func (bc BenchmarkConfig) Encode(buffer *bytes.Buffer)

type BenchmarkResult

type BenchmarkResult struct {
	// Components Vec<(BenchmarkParameter, sc.U32)>
	Time sc.U128
	// StorageRootTime sc.U128
	Reads sc.U32
	// RepeatReads sc.U32
	Writes sc.U32
}

Result from running benchmarks on a FRAME pallet. Contains duration of the function call in nanoseconds along with the benchmark parameters used for that benchmark result.

func DecodeBenchmarkResult

func DecodeBenchmarkResult(buffer *bytes.Buffer) (BenchmarkResult, error)

func (BenchmarkResult) Bytes

func (br BenchmarkResult) Bytes() []byte

func (BenchmarkResult) Encode

func (br BenchmarkResult) Encode(buffer *bytes.Buffer)

Jump to

Keyboard shortcuts

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