metrics

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

This is copied from the sei-chain source: https://github.com/sei-protocol/sei-chain/blob/main/utils/metrics/metrics_util.go

Index

Constants

View Source
const (
	INFERER_SCORE_EVENT                = "inferer_score_event"
	FORECASTER_SCORE_EVENT             = "forecaster_score_event"
	REPUTER_SOCRE_EVENT                = "reputer_score_event"
	NETWORK_LOSS_EVENT                 = "network_loss_event"
	INFERER_REWARD_EVENT               = "inferer_reward_event"
	FORECASTER_REWARD_EVENT            = "forecaster_reward_event"
	REPUTER_REWARD_EVENT               = "reputer_reward_event"
	WORKER_LAST_COMMIT_EVENT           = "worker_last_commit_event"
	REPUTER_LAST_COMMIT_EVENT          = "reputer_last_commit_event"
	FORECAST_TASK_SCORE_EVENT          = "forecast_task_score_event"
	TOPIC_REWARD_EVENT                 = "topic_reward_event"
	WORKER_EMA_SCORE_EVENT             = "worker_ema_score_event"
	LISTENING_COEFFICIENTS_EVENT       = "listening_coefficients_event"
	INFERER_NETWORK_REGRET_EVENT       = "inferer_network_regret_event"
	FORECASTER_NETWORK_REGRET_EVENT    = "forecaster_network_regret_event"
	NAIVE_INFERER_NETWORK_REGRET_EVENT = "naive_inferer_network_regret_event"
	TOPIC_INITIAL_REGRET_EVENT         = "topic_initial_regret_event"
)

Variables

This section is empty.

Functions

func IncrProducerEventCount

func IncrProducerEventCount(msgType string)

IncrProducerEventCount increments the counter for events produced. This metric counts the number of events produced by the system. Metric Name:

allora_loadtest_produce_count

func IncrementRpcRequestCounter

func IncrementRpcRequestCounter(endpoint string, err *error)

Measures RPC endpoint request throughput Metric Name:

allora_rpc_request_counter

func MeasureRpcRequestLatency

func MeasureRpcRequestLatency(endpoint string, startTime time.Time)

Measures the RPC request latency in milliseconds Metric Name:

allora_rpc_request_latency_ms

func RecordMetrics

func RecordMetrics(apiMethod string, startTime time.Time, err *error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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