Documentation
¶
Index ¶
- Constants
- Variables
- func Count(m Metric, value int64, labels []string) error
- func Gauge(m Metric, value float64, labels []string) error
- func SendBlockReplayMetrics(r mithrilmetrics.BlockReplay)
- func StartMetricsServer()
- func Timing(m Metric, nanos uint64, labels []string) error
- type Metric
- type Prometheusmetrics
Constants ¶
View Source
const ( TimingT metricType = iota CountT GaugeT )
Variables ¶
View Source
var ( PreprocessBlock = Metric{"preprocess_block"} TxLoop = Metric{"tx_loop"} LoadBlockAccounts = Metric{"load_block_accounts"} RunIncinerator = Metric{"run_incinerator"} Reward = Metric{"reward"} Rent = Metric{"rent"} BlockUpdateAccounts = Metric{"block_update_accounts"} AccountsDeltaHash = Metric{"accounts_delta_hash"} BankHash = Metric{"bank_hash"} InstructionsAndAccountMetasFromTx = Metric{"instructions_and_account_metas_from_tx"} ComputeBudgetExecutionInstructions = Metric{"compute_budget_execution_instructions"} AccountsFromTx = Metric{"accounts_from_tx"} PreBalanceDivergenceCheck = Metric{"pre_balance_divergence_check"} CalcAndDeductFees = Metric{"calc_and_deduct_fees"} ReadRentSysvar = Metric{"read_rent_sysvar"} PreTxRentStates = Metric{"pre_tx_rent_states"} IxLoop = Metric{"ix_loop"} PostTxRentStates = Metric{"post_tx_rent_states"} PostBalanceDivergenceCheck = Metric{"post_balance_divergence_check"} TxUpdateAccounts = Metric{"tx_update_accounts"} GetNextIxCtx = Metric{"get_next_ix_ctx"} NextIxCtxConfigure = Metric{"next_ix_ctx_configure"} IxPush = Metric{"ix_push"} IxPop = Metric{"ix_pop"} ExecIxResolveNativeProgram = Metric{"exec_ix_resolve_native_program"} ExecIxNativeProgramSystem = Metric{"exec_ix_native_program_system"} ExecIxNativeProgramStake = Metric{"exec_ix_native_program_stake"} ExecIxNativeProgramVote = Metric{"exec_ix_native_program_vote"} ExecIxNativeProgramComputeBudget = Metric{"exec_ix_native_program_compute_budget"} ExecIxNativeProgramBpfLoader2 = Metric{"exec_ix_native_program_bpf_loader2"} ExecIxNativeProgramBpfLoaderDeprecated = Metric{"exec_ix_native_program_bpf_loader_deprecated"} ExecIxNativeProgramBpfLoaderUpgradeable = Metric{"exec_ix_native_program_bpf_loader_upgradeable"} ExecIxNativeProgramZkElgamalProof = Metric{"exec_ix_native_program_zk_elgamal_proof"} ExecIxNativeProgramEd25519Precompile = Metric{"exec_ix_native_program_ed25519precompile"} ExecIxNativeProgramSecp256kPrecompile = Metric{"exec_ix_native_program_secp256k_precompile"} FixupInstructionsSysvarAccount = Metric{"fixup_instructions_sysvar_account"} InstructionAccountsFromAccountMetas = Metric{"instruction_accounts_from_account_metas"} SbpfInterpreterNew = Metric{"sbpf_interpreter_new"} SbpfInterpreterRun = Metric{"sbpf_interpreter_run"} AddProgramToCache = Metric{"add_program_to_cache"} GetProgramAccount = Metric{"get_program_account"} GetProgramDataCached = Metric{"get_program_data_cached"} GetProgramDataUncachedAccountsDb = Metric{"get_program_data_uncached_accounts_db"} GetProgramDataUncachedAccounts = Metric{"get_program_data_uncached_accounts"} GetProgramDataUncachedMarshal = Metric{"get_program_data_uncached_marshal"} TaskIndexEntryCommitterLatency = Metric{"tasks_index_entry_committer_latency"} TaskSetIfSlotHigherLatency = Metric{"tasks_set_if_slot_higher_latency"} TasksIndexEntryBuilderLatency = Metric{"tasks_index_entry_builder_latency"} TasksAppendVecCopyingLatency = Metric{"tasks_append_vec_copying_latency"} SlotReplayDurationMs = Metric{"slot_replay_duration_ms"} TxsPerBlock = Metric{"txs_per_block"} SnapshotTarBytesRead = Metric{"snapshot_tar_bytes_read"} SlotReplays = Metric{"slot_replays"} SnapshotWorkerPoolUtilization = Metric{"snapshot_worker_pool_utilization"} TasksSetIfSlotHigherQueueSize = Metric{"tasks_set_if_slot_higher_queue_size"} Epoch = Metric{"epoch"} Slot = Metric{"slot"} TestCount = Metric{"test_count"} // used for testing purposes, not a real metric )
View Source
var MetricToLabels = map[Metric][]string{ PreprocessBlock: {"phase"}, TxLoop: {"phase"}, LoadBlockAccounts: {"phase"}, RunIncinerator: {"phase"}, Reward: {"phase"}, Rent: {"phase"}, BlockUpdateAccounts: {"phase"}, AccountsDeltaHash: {"phase"}, BankHash: {"phase"}, InstructionsAndAccountMetasFromTx: {"phase"}, ComputeBudgetExecutionInstructions: {"phase"}, AccountsFromTx: {"phase"}, PreBalanceDivergenceCheck: {"phase"}, CalcAndDeductFees: {"phase"}, ReadRentSysvar: {"phase"}, PreTxRentStates: {"phase"}, IxLoop: {"phase"}, PostTxRentStates: {"phase"}, PostBalanceDivergenceCheck: {"phase"}, TxUpdateAccounts: {"phase"}, GetNextIxCtx: {"phase"}, NextIxCtxConfigure: {"phase"}, IxPush: {"phase"}, IxPop: {"phase"}, ExecIxResolveNativeProgram: {"phase"}, ExecIxNativeProgramSystem: {"phase"}, ExecIxNativeProgramStake: {"phase"}, ExecIxNativeProgramVote: {"phase"}, ExecIxNativeProgramComputeBudget: {"phase"}, ExecIxNativeProgramBpfLoader2: {"phase"}, ExecIxNativeProgramBpfLoaderDeprecated: {"phase"}, ExecIxNativeProgramBpfLoaderUpgradeable: {"phase"}, ExecIxNativeProgramZkElgamalProof: {"phase"}, ExecIxNativeProgramEd25519Precompile: {"phase"}, ExecIxNativeProgramSecp256kPrecompile: {"phase"}, FixupInstructionsSysvarAccount: {"phase"}, InstructionAccountsFromAccountMetas: {"phase"}, SbpfInterpreterNew: {"phase"}, SbpfInterpreterRun: {"phase"}, AddProgramToCache: {"phase"}, GetProgramAccount: {"phase"}, GetProgramDataCached: {"phase"}, GetProgramDataUncachedAccountsDb: {"phase"}, GetProgramDataUncachedAccounts: {"phase"}, GetProgramDataUncachedMarshal: {"phase"}, TaskIndexEntryCommitterLatency: {}, TaskSetIfSlotHigherLatency: {}, TasksIndexEntryBuilderLatency: {}, TasksAppendVecCopyingLatency: {}, SlotReplayDurationMs: {}, TxsPerBlock: {}, SnapshotTarBytesRead: {}, SlotReplays: {}, SnapshotWorkerPoolUtilization: {"task"}, TasksSetIfSlotHigherQueueSize: {}, Epoch: {}, Slot: {}, TestCount: {"test"}, }
View Source
var MetricToType = map[Metric]metricType{ PreprocessBlock: TimingT, TxLoop: TimingT, LoadBlockAccounts: TimingT, RunIncinerator: TimingT, Reward: TimingT, Rent: TimingT, BlockUpdateAccounts: TimingT, AccountsDeltaHash: TimingT, BankHash: TimingT, InstructionsAndAccountMetasFromTx: TimingT, ComputeBudgetExecutionInstructions: TimingT, AccountsFromTx: TimingT, PreBalanceDivergenceCheck: TimingT, CalcAndDeductFees: TimingT, ReadRentSysvar: TimingT, PreTxRentStates: TimingT, IxLoop: TimingT, PostTxRentStates: TimingT, PostBalanceDivergenceCheck: TimingT, TxUpdateAccounts: TimingT, GetNextIxCtx: TimingT, NextIxCtxConfigure: TimingT, IxPush: TimingT, IxPop: TimingT, ExecIxResolveNativeProgram: TimingT, ExecIxNativeProgramSystem: TimingT, ExecIxNativeProgramStake: TimingT, ExecIxNativeProgramVote: TimingT, ExecIxNativeProgramComputeBudget: TimingT, ExecIxNativeProgramBpfLoader2: TimingT, ExecIxNativeProgramBpfLoaderDeprecated: TimingT, ExecIxNativeProgramBpfLoaderUpgradeable: TimingT, ExecIxNativeProgramZkElgamalProof: TimingT, ExecIxNativeProgramEd25519Precompile: TimingT, ExecIxNativeProgramSecp256kPrecompile: TimingT, FixupInstructionsSysvarAccount: TimingT, InstructionAccountsFromAccountMetas: TimingT, SbpfInterpreterNew: TimingT, SbpfInterpreterRun: TimingT, AddProgramToCache: TimingT, GetProgramAccount: TimingT, GetProgramDataCached: TimingT, GetProgramDataUncachedAccountsDb: TimingT, GetProgramDataUncachedAccounts: TimingT, GetProgramDataUncachedMarshal: TimingT, TaskIndexEntryCommitterLatency: TimingT, TaskSetIfSlotHigherLatency: TimingT, TasksIndexEntryBuilderLatency: TimingT, TasksAppendVecCopyingLatency: TimingT, SlotReplayDurationMs: TimingT, TxsPerBlock: TimingT, SnapshotTarBytesRead: CountT, SlotReplays: CountT, TestCount: CountT, SnapshotWorkerPoolUtilization: GaugeT, TasksSetIfSlotHigherQueueSize: GaugeT, Epoch: GaugeT, Slot: GaugeT, }
Functions ¶
func SendBlockReplayMetrics ¶
func SendBlockReplayMetrics(r mithrilmetrics.BlockReplay)
func StartMetricsServer ¶
func StartMetricsServer()
StartMetricsServer starts the Prometheus metrics HTTP server. Call this after printing the banner to avoid error messages appearing before it.
Types ¶
type Prometheusmetrics ¶
type Prometheusmetrics struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.