metrics

package
v0.38.0-preview.0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetTransactionExecutionMetricsAfterResponse

type GetTransactionExecutionMetricsAfterResponse = map[uint64][]TransactionExecutionMetrics

GetTransactionExecutionMetricsAfterResponse is the response type for GetTransactionExecutionMetricsAfter It is a map of block height to a list of transaction execution metrics

type TransactionExecutionMetrics

type TransactionExecutionMetrics struct {
	TransactionID          flow.Identifier
	ExecutionTime          time.Duration
	ExecutionEffortWeights map[cadenceCommon.ComputationKind]uint
}

type TransactionExecutionMetricsProvider

type TransactionExecutionMetricsProvider interface {
	component.Component
	protocol.Consumer

	// GetTransactionExecutionMetricsAfter returns the transaction metrics for all blocks higher than the given height
	// It returns a map of block height to a list of transaction execution metrics
	// Blocks that are out of scope (only a limited number blocks are kept in memory) are not returned
	GetTransactionExecutionMetricsAfter(height uint64) (GetTransactionExecutionMetricsAfterResponse, error)

	// Collect the transaction metrics for the given block
	// Collect does not block, it returns immediately
	Collect(
		blockId flow.Identifier,
		blockHeight uint64,
		t TransactionExecutionMetrics,
	)
}

func NewTransactionExecutionMetricsProvider

func NewTransactionExecutionMetricsProvider(
	log zerolog.Logger,
	executionState state.FinalizedExecutionState,
	headers storage.Headers,
	latestFinalizedAndExecutedHeight uint64,
	bufferSize uint,
) TransactionExecutionMetricsProvider

Jump to

Keyboard shortcuts

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