metrics

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ActiveSubstreams = MetricSet.NewGauge("substreams_active_requests", "Number of active Substreams requests")
View Source
var AppReadinessTier1 = MetricSet.NewAppReadiness("substreams_tier1")
View Source
var AppReadinessTier2 = MetricSet.NewAppReadiness("substreams_tier2")
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")
View Source
var SubstreamsCounter = MetricSet.NewCounter("substreams_counter", "Substreams requests count")
View Source
var Tier1ActiveWorkerRequest = MetricSet.NewGauge("substreams_tier1_active_worker_requests", "Number of active Substreams worker requests a tier1 app is currently doing against tier2 nodes")
View Source
var Tier1WorkerRejectedOverloadedCounter = MetricSet.NewCounter("substreams_tier1_worker_rejected_overloaded_counter", "Counter for number of times a worker rejected a request because it was overloaded (included in RetryCounter)")
View Source
var Tier1WorkerRequestCounter = MetricSet.NewCounter("substreams_tier1_worker_request_counter", "Counter for total Substreams worker requests a tier1 app made against tier2 nodes")
View Source
var Tier1WorkerRetryCounter = MetricSet.NewCounter("substreams_tier1_worker_retry_counter", "Counter for total retryable errors returned from tier2")
View Source
var Tier2ActiveRequests = MetricSet.NewGauge("substreams_tier2_active_requests", "Number of active Substreams requests the tier2 is currently serving")
View Source
var Tier2RequestCounter = MetricSet.NewCounter("substreams_tier2_request_counter", "Counter for total Substreams requests the tier2 served")

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) RecordModuleWasmBlockBegin added in v1.1.19

func (s *Stats) RecordModuleWasmBlockBegin(moduleName string) uint64

RecordModuleWasmBlockBegin should be called once per module per block

func (*Stats) RecordModuleWasmBlockEnd added in v1.1.19

func (s *Stats) RecordModuleWasmBlockEnd(moduleName string, uniqueID uint64)

RecordModuleWasmBlockEnd 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) RecordModuleWasmExternalCallBegin added in v1.1.19

func (s *Stats) RecordModuleWasmExternalCallBegin(moduleName string, extension string) uint64

RecordModuleWasmExternalCallBegin can be called multiple times per module per block, for each external module call (ex: eth_call).

func (*Stats) RecordModuleWasmExternalCallEnd added in v1.1.19

func (s *Stats) RecordModuleWasmExternalCallEnd(moduleName string, extension string, uniqueID uint64)

RecordModuleWasmExternalCallEnd 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) 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