report

package
v0.0.0-...-5f4adf5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockStore

type BlockStore interface {
	Height() int64
	Base() int64
	LoadBlock(int64) *types.Block
}

BlockStore defines the set of methods needed by the report generator from CometBFT's store.Blockstore type. Using an interface allows for tests to more easily simulate the required behavior without having to use the more complex real API.

type DataPoint

type DataPoint struct {
	Duration  time.Duration
	BlockTime time.Time
	Hash      []byte
}

DataPoint contains the set of data collected for each transaction.

type Report

type Report struct {
	ID                      uuid.UUID
	Rate, Connections, Size uint64
	Max, Min, Avg, StdDev   time.Duration

	// NegativeCount is the number of negative durations encountered while
	// reading the transaction data. A negative duration means that
	// a transaction timestamp was greater than the timestamp of the block it
	// was included in and likely indicates an issue with the experimental
	// setup.
	NegativeCount int

	// All contains all data points gathered from all valid transactions.
	// The order of the contents of All is not guaranteed to be match the order of transactions
	// in the chain.
	All []DataPoint
	// contains filtered or unexported fields
}

Report contains the data calculated from reading the timestamped transactions of each block found in the blockstore.

type Reports

type Reports struct {
	// contains filtered or unexported fields
}

func GenerateFromBlockStore

func GenerateFromBlockStore(s BlockStore) (*Reports, error)

GenerateFromBlockStore creates a Report using the data in the provided BlockStore.

func (*Reports) ErrorCount

func (rs *Reports) ErrorCount() int

func (*Reports) List

func (rs *Reports) List() []Report

Jump to

Keyboard shortcuts

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