metrics

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppReadiness = MetricSet.NewAppReadiness("firehose")
View Source
var BlockBeginProcess = MetricSet.NewCounter("substreams_block_process_start_counter", "Counter for total block processes started, used for rate")
View Source
var BlockEndProcess = MetricSet.NewCounter("substreams_block_process_end_counter", "Counter for total block processes ended, used for rate")
View Source
var MetricSet = dmetrics.NewSet()
View Source
var SquashersEnded = MetricSet.NewCounter("substreams_total_squash_processes_closed", "Counter for Total squash processes closed, used for active processes")
View Source
var SquashersStarted = MetricSet.NewCounter("substreams_total_squash_processes_launched", "Counter for Total squash processes launched, used for rate")
View Source
var SquashesLaunched = MetricSet.NewCounter("substreams_total_squashes_launched", "Counter for Total squashes launched, used for rate")

Functions

func RegisterMetricSet added in v1.1.6

func RegisterMetricSet(zlog *zap.Logger)

Types

type Config added in v1.1.8

type Config struct {
	UserID           string
	ApiKeyID         string
	OutputModule     string
	OutputModuleHash string
	ProductionMode   bool
	Tier2            bool
}

type Stats

type Stats struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewReqStats

func NewReqStats(config *Config, logger *zap.Logger) *Stats

func (*Stats) AggregatedModulesStats added in v1.1.12

func (s *Stats) AggregatedModulesStats() []*pbsubstreamsrpc.ModuleStats

func (*Stats) JobsStats added in v1.1.12

func (s *Stats) JobsStats() []*pbsubstreamsrpc.Job

func (*Stats) LocalModulesStats added in v1.1.12

func (s *Stats) LocalModulesStats() []*pbssinternal.ModuleStats

func (*Stats) LogAndClose added in v1.1.8

func (s *Stats) LogAndClose()

func (*Stats) RecordBlock

func (s *Stats) RecordBlock(ref bstream.BlockRef)

func (*Stats) RecordEndSubrequest added in v1.1.12

func (s *Stats) RecordEndSubrequest(jobIdx uint64)

func (*Stats) RecordInitializationComplete added in v1.1.12

func (s *Stats) RecordInitializationComplete()

func (*Stats) RecordJobUpdate added in v1.1.12

func (s *Stats) RecordJobUpdate(jobIdx uint64, upd *pbssinternal.Update)

RecordJobUpdate will be called each time a job sends an update message

func (*Stats) RecordModuleMergeComplete added in v1.1.12

func (s *Stats) RecordModuleMergeComplete(module string)

func (*Stats) RecordModuleMerging added in v1.1.12

func (s *Stats) RecordModuleMerging(module string)

func (*Stats) RecordModuleWasmBlock added in v1.1.12

func (s *Stats) RecordModuleWasmBlock(moduleName string, elapsed time.Duration)

RecordModuleWasmBlock should be called once per module per block. `elapsed` is the time spent in executing the WASM code, including store and extension calls

func (*Stats) RecordModuleWasmExternalCall added in v1.1.12

func (s *Stats) RecordModuleWasmExternalCall(moduleName string, extension string, elapsed time.Duration)

RecordModuleWasmExternalCall can be called multiple times per module per block, for each external module call (ex: eth_call). `elapsed` is the time spent in executing that call.

func (*Stats) RecordModuleWasmStoreDeletePrefix added in v1.1.12

func (s *Stats) RecordModuleWasmStoreDeletePrefix(moduleName string, sizeBytes uint64, elapsed time.Duration)

RecordModuleWasmStoreDeletePrefix can be called multiple times per module per block `elapsed` is the time spent in executing that operation.

func (*Stats) RecordModuleWasmStoreRead added in v1.1.12

func (s *Stats) RecordModuleWasmStoreRead(moduleName string, elapsed time.Duration)

RecordModuleWasmStoreRead can be called multiple times per module per block `elapsed` is the time spent in executing that operation.

func (*Stats) RecordModuleWasmStoreWrite added in v1.1.12

func (s *Stats) RecordModuleWasmStoreWrite(moduleName string, sizeBytes uint64, elapsed time.Duration)

RecordModuleWasmStoreWrite can be called multiple times per module per block `elapsed` is the time spent in executing that operation.

func (*Stats) RecordNewSubrequest added in v1.1.12

func (s *Stats) RecordNewSubrequest(stage uint32, startBlock, stopBlock uint64) (id uint64)

func (*Stats) RecordStages added in v1.1.12

func (s *Stats) RecordStages(stages []*pbsubstreamsrpc.Stage)

func (*Stats) RemoteBytesConsumption added in v1.1.12

func (s *Stats) RemoteBytesConsumption() (read uint64, written uint64)

func (*Stats) Stage added in v1.1.12

func (s *Stats) Stage(module string) (uint32, *pbsubstreamsrpc.Stage)

func (*Stats) Stages added in v1.1.12

func (s *Stats) Stages() []*pbsubstreamsrpc.Stage

Jump to

Keyboard shortcuts

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