From 3a5f73d7b59ca8a99d5aa9985a4fb08c88e4e5aa Mon Sep 17 00:00:00 2001 From: Philip Taffet Date: Wed, 20 Mar 2024 21:31:20 +0000 Subject: [PATCH] fd_pack: add metric for time spent in various states --- src/app/fdctl/run/tiles/fd_pack.c | 54 ++++++++- src/ballet/pack/fd_pack.c | 8 +- src/disco/metrics/generated/fd_metrics_pack.c | 16 +++ src/disco/metrics/generated/fd_metrics_pack.h | 113 +++++++++++++++--- src/disco/metrics/metrics.xml | 20 ++++ 5 files changed, 190 insertions(+), 21 deletions(-) diff --git a/src/app/fdctl/run/tiles/fd_pack.c b/src/app/fdctl/run/tiles/fd_pack.c index f968278b24..959c23b92b 100644 --- a/src/app/fdctl/run/tiles/fd_pack.c +++ b/src/app/fdctl/run/tiles/fd_pack.c @@ -110,8 +110,37 @@ typedef struct { ulong insert_result[ FD_PACK_INSERT_RETVAL_CNT ]; fd_histf_t schedule_duration[ 1 ]; fd_histf_t insert_duration [ 1 ]; + + struct { + uint metric_state; + long metric_state_begin; + long metric_timing[ 16 ]; + }; } fd_pack_ctx_t; + +#define FD_PACK_METRIC_STATE_TRANSACTIONS 0 +#define FD_PACK_METRIC_STATE_BANKS 1 +#define FD_PACK_METRIC_STATE_LEADER 2 +#define FD_PACK_METRIC_STATE_MICROBLOCKS 3 + +/* Updates one component of the metric state. If the state has changed, + records the change. */ +static inline void +update_metric_state( fd_pack_ctx_t * ctx, + long effective_as_of, + int type, + int status ) { + uint current_state = fd_uint_insert_bit( ctx->metric_state, type, status ); + if( FD_UNLIKELY( current_state!=ctx->metric_state ) ) { + FD_LOG_INFO(( "Transitioning to state %x by setting bit %i to %i", current_state, type, status )); + ctx->metric_timing[ ctx->metric_state ] += effective_as_of - ctx->metric_state_begin; + ctx->metric_state_begin = effective_as_of; + ctx->metric_state = current_state; + } +} + + FD_FN_CONST static inline ulong scratch_align( void ) { return 4096UL; @@ -138,7 +167,8 @@ static inline void metrics_write( void * _ctx ) { fd_pack_ctx_t * ctx = (fd_pack_ctx_t *)_ctx; - FD_MCNT_ENUM_COPY( PACK, TRANSACTION_INSERTED, ctx->insert_result ); + FD_MCNT_ENUM_COPY( PACK, TRANSACTION_INSERTED, ctx->insert_result ); + FD_MCNT_ENUM_COPY( PACK, METRIC_TIMING, ((ulong*)ctx->metric_timing) ); FD_MHIST_COPY( PACK, SCHEDULE_MICROBLOCK_DURATION_SECONDS, ctx->schedule_duration ); FD_MHIST_COPY( PACK, INSERT_TRANSACTION_DURATION_SECONDS, ctx->insert_duration ); } @@ -183,6 +213,9 @@ after_credit( void * _ctx, ctx->leader_slot = ULONG_MAX; fd_pack_end_block( ctx->pack ); ctx->slot_microblock_cnt = 0UL; + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_LEADER, 0 ); + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_BANKS, 0 ); + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_MICROBLOCKS, 0 ); return; } @@ -198,6 +231,8 @@ after_credit( void * _ctx, doesn't always get the best transactions. */ ulong offset = fd_rng_ulong_roll( ctx->rng, bank_cnt ); + int any_ready = 0; + int any_scheduled = 0; /* Is it time to schedule the next microblock? For each banking thread, if it's not busy... */ for( ulong _i=0UL; _ibank_current[i] )==ctx->bank_expect[i]) & (ctx->bank_ready_at[i]pack, i ); /* TODO: record metrics for expire */ @@ -217,6 +253,7 @@ after_credit( void * _ctx, fd_histf_sample( ctx->schedule_duration, (ulong)schedule_duration ); if( FD_LIKELY( schedule_cnt ) ) { + any_scheduled = 1; ulong tspub = (ulong)fd_frag_meta_ts_comp( fd_tickcount() ); ulong chunk = ctx->out_chunk; ulong msg_sz = schedule_cnt*sizeof(fd_txn_p_t); @@ -237,9 +274,16 @@ after_credit( void * _ctx, } } } + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_BANKS, any_ready ); + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_MICROBLOCKS, any_scheduled ); + now = fd_log_wallclock(); + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_TRANSACTIONS, fd_pack_avail_txn_cnt( ctx->pack )>0 ); /* Did we send the maximum allowed microblocks? Then end the slot. */ if( FD_UNLIKELY( ctx->slot_microblock_cnt==ctx->slot_max_microblocks )) { + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_LEADER, 0 ); + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_BANKS, 0 ); + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_MICROBLOCKS, 0 ); ctx->leader_slot = ULONG_MAX; ctx->slot_microblock_cnt = 0UL; fd_pack_end_block( ctx->pack ); @@ -288,6 +332,7 @@ during_frag( void * _ctx, ctx->slot_end_ns = 0L; ctx->_slot_end_ns = became_leader->slot_end_ns; + update_metric_state( ctx, fd_log_wallclock(), FD_PACK_METRIC_STATE_LEADER, 1 ); return; } @@ -363,6 +408,7 @@ after_frag( void * _ctx, (void)mux; fd_pack_ctx_t * ctx = (fd_pack_ctx_t *)_ctx; + long now = fd_log_wallclock(); if( FD_UNLIKELY( in_idx==POH_IN_IDX ) ) { ctx->slot_end_ns = ctx->_slot_end_ns; @@ -370,13 +416,14 @@ after_frag( void * _ctx, } else { /* Normal transaction case */ long insert_duration = -fd_tickcount(); - int result = fd_pack_insert_txn_fini( ctx->pack, ctx->cur_spot, (ulong)(fd_log_wallclock()-LONG_MIN) ); + int result = fd_pack_insert_txn_fini( ctx->pack, ctx->cur_spot, (ulong)(now-LONG_MIN) ); insert_duration += fd_tickcount(); ctx->insert_result[ result + FD_PACK_INSERT_RETVAL_OFF ]++; fd_histf_sample( ctx->insert_duration, (ulong)insert_duration ); ctx->cur_spot = NULL; } + update_metric_state( ctx, now, FD_PACK_METRIC_STATE_TRANSACTIONS, fd_pack_avail_txn_cnt( ctx->pack )>0 ); } static void @@ -437,6 +484,9 @@ unprivileged_init( fd_topo_t * topo, FD_MHIST_SECONDS_MAX( PACK, SCHEDULE_MICROBLOCK_DURATION_SECONDS ) ) ); fd_histf_join( fd_histf_new( ctx->insert_duration, FD_MHIST_SECONDS_MIN( PACK, INSERT_TRANSACTION_DURATION_SECONDS ), FD_MHIST_SECONDS_MAX( PACK, INSERT_TRANSACTION_DURATION_SECONDS ) ) ); + ctx->metric_state = 0; + ctx->metric_state_begin = fd_log_wallclock(); + memset( ctx->metric_timing, '\0', 16*sizeof(long) ); FD_LOG_INFO(( "packing microblocks of at most %lu transactions to %lu bank tiles", MAX_TXN_PER_MICROBLOCK, tile->pack.bank_tile_count )); diff --git a/src/ballet/pack/fd_pack.c b/src/ballet/pack/fd_pack.c index 3d30309dc9..adb8658619 100644 --- a/src/ballet/pack/fd_pack.c +++ b/src/ballet/pack/fd_pack.c @@ -1100,10 +1100,10 @@ fd_pack_schedule_next_microblock( fd_pack_t * pack, pack->cumulative_block_cost += status.cus_scheduled; pack->data_bytes_consumed += status.bytes_scheduled; - pack->microblock_cnt += (ulong)(scheduled>0UL); - pack->outstanding_microblock_mask |= 1UL << bank_tile; - - if( FD_LIKELY( scheduled ) ) pack->data_bytes_consumed += MICROBLOCK_DATA_OVERHEAD; + ulong nonempty = (ulong)(scheduled>0UL); + pack->microblock_cnt += nonempty; + pack->outstanding_microblock_mask |= nonempty << bank_tile; + pack->data_bytes_consumed += nonempty * MICROBLOCK_DATA_OVERHEAD; /* Update metrics counters */ FD_MGAUGE_SET( PACK, AVAILABLE_TRANSACTIONS, pack->pending_txn_cnt ); diff --git a/src/disco/metrics/generated/fd_metrics_pack.c b/src/disco/metrics/generated/fd_metrics_pack.c index d80f1fb95b..0de72f8ca7 100644 --- a/src/disco/metrics/generated/fd_metrics_pack.c +++ b/src/disco/metrics/generated/fd_metrics_pack.c @@ -21,6 +21,22 @@ const fd_metrics_meta_t FD_METRICS_PACK[FD_METRICS_PACK_TOTAL] = { DECLARE_METRIC_COUNTER( PACK, TRANSACTION_INSERTED_VOTE_ADD ), DECLARE_METRIC_COUNTER( PACK, TRANSACTION_INSERTED_NONVOTE_REPLACE ), DECLARE_METRIC_COUNTER( PACK, TRANSACTION_INSERTED_VOTE_REPLACE ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_BANK_NO_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_BANK_NO_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_NO_BANK_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_NO_BANK_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_BANK_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_BANK_LEADER_NO_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_NO_BANK_NO_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_BANK_NO_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_BANK_NO_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_NO_BANK_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_NO_BANK_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_NO_TXN_BANK_LEADER_MICROBLOCK ), + DECLARE_METRIC_COUNTER( PACK, METRIC_TIMING_TXN_BANK_LEADER_MICROBLOCK ), DECLARE_METRIC_GAUGE( PACK, AVAILABLE_TRANSACTIONS ), DECLARE_METRIC_GAUGE( PACK, AVAILABLE_VOTE_TRANSACTIONS ), DECLARE_METRIC_GAUGE( PACK, PENDING_TRANSACTIONS_HEAP_SIZE ), diff --git a/src/disco/metrics/generated/fd_metrics_pack.h b/src/disco/metrics/generated/fd_metrics_pack.h index 383101fd16..ae61c3306b 100644 --- a/src/disco/metrics/generated/fd_metrics_pack.h +++ b/src/disco/metrics/generated/fd_metrics_pack.h @@ -112,74 +112,157 @@ #define FD_METRICS_COUNTER_PACK_TRANSACTION_INSERTED_VOTE_REPLACE_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_INSERTED_VOTE_REPLACE_DESC "Result of inserting a transaction into the pack object (Simple vote transaction replaced a lower priority transaction)" -#define FD_METRICS_GAUGE_PACK_AVAILABLE_TRANSACTIONS_OFF (256UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_OFF (256UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_CNT (16UL) + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_OFF (256UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_no_txn_no_bank_no_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had no transactions available, and wasn't leader)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_OFF (257UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_txn_no_bank_no_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had transactions available, but wasn't leader or had hit a limit)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_NO_MICROBLOCK_OFF (258UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_no_txn_bank_no_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had no transactions available, had banks but wasn't leader?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_NO_MICROBLOCK_OFF (259UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_txn_bank_no_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had transactions available, had banks but wasn't leader?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_NO_MICROBLOCK_OFF (260UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_no_txn_no_bank_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had no transactions available, and was leader but had no available banks)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_NO_MICROBLOCK_OFF (261UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_txn_no_bank_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had transactions available, was leader, but had no available banks)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_NO_MICROBLOCK_OFF (262UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_no_txn_bank_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had available banks but no transactions)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_NO_MICROBLOCK_OFF (263UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_NO_MICROBLOCK_NAME "pack_metric_timing_txn_bank_leader_no_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_NO_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_NO_MICROBLOCK_DESC "Time in nanos spent in each state (Pack had banks and transactions available but couldn't schedule anything non-conflicting)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_MICROBLOCK_OFF (264UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_MICROBLOCK_NAME "pack_metric_timing_no_txn_no_bank_no_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_NO_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock while not leader?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_MICROBLOCK_OFF (265UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_MICROBLOCK_NAME "pack_metric_timing_txn_no_bank_no_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_NO_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock while not leader?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_MICROBLOCK_OFF (266UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_MICROBLOCK_NAME "pack_metric_timing_no_txn_bank_no_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_NO_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock while not leader?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_MICROBLOCK_OFF (267UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_MICROBLOCK_NAME "pack_metric_timing_txn_bank_no_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_NO_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock while not leader?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_MICROBLOCK_OFF (268UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_MICROBLOCK_NAME "pack_metric_timing_no_txn_no_bank_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_NO_BANK_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock but all banks were busy?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_MICROBLOCK_OFF (269UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_MICROBLOCK_NAME "pack_metric_timing_txn_no_bank_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_NO_BANK_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock but all banks were busy?)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_MICROBLOCK_OFF (270UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_MICROBLOCK_NAME "pack_metric_timing_no_txn_bank_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_NO_TXN_BANK_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock and now has no transactions)" + +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_MICROBLOCK_OFF (271UL) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_MICROBLOCK_NAME "pack_metric_timing_txn_bank_leader_microblock" +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_MICROBLOCK_TYPE (FD_METRICS_TYPE_COUNTER) +#define FD_METRICS_COUNTER_PACK_METRIC_TIMING_TXN_BANK_LEADER_MICROBLOCK_DESC "Time in nanos spent in each state (Pack scheduled a non-empty microblock)" + +#define FD_METRICS_GAUGE_PACK_AVAILABLE_TRANSACTIONS_OFF (272UL) #define FD_METRICS_GAUGE_PACK_AVAILABLE_TRANSACTIONS_NAME "pack_available_transactions" #define FD_METRICS_GAUGE_PACK_AVAILABLE_TRANSACTIONS_TYPE (FD_METRICS_TYPE_GAUGE) #define FD_METRICS_GAUGE_PACK_AVAILABLE_TRANSACTIONS_DESC "The total number of pending transactions in pack's pool that are available to be scheduled" -#define FD_METRICS_GAUGE_PACK_AVAILABLE_VOTE_TRANSACTIONS_OFF (257UL) +#define FD_METRICS_GAUGE_PACK_AVAILABLE_VOTE_TRANSACTIONS_OFF (273UL) #define FD_METRICS_GAUGE_PACK_AVAILABLE_VOTE_TRANSACTIONS_NAME "pack_available_vote_transactions" #define FD_METRICS_GAUGE_PACK_AVAILABLE_VOTE_TRANSACTIONS_TYPE (FD_METRICS_TYPE_GAUGE) #define FD_METRICS_GAUGE_PACK_AVAILABLE_VOTE_TRANSACTIONS_DESC "The number of pending simple vote transactions in pack's pool that are available to be scheduled" -#define FD_METRICS_GAUGE_PACK_PENDING_TRANSACTIONS_HEAP_SIZE_OFF (258UL) +#define FD_METRICS_GAUGE_PACK_PENDING_TRANSACTIONS_HEAP_SIZE_OFF (274UL) #define FD_METRICS_GAUGE_PACK_PENDING_TRANSACTIONS_HEAP_SIZE_NAME "pack_pending_transactions_heap_size" #define FD_METRICS_GAUGE_PACK_PENDING_TRANSACTIONS_HEAP_SIZE_TYPE (FD_METRICS_TYPE_GAUGE) #define FD_METRICS_GAUGE_PACK_PENDING_TRANSACTIONS_HEAP_SIZE_DESC "The maximum number of pending transactions that pack can consider. This value is fixed at Firedancer startup but is a useful reference for AvailableTransactions and AvailableVoteTransactions." -#define FD_METRICS_COUNTER_PACK_MICROBLOCK_PER_BLOCK_LIMIT_OFF (259UL) +#define FD_METRICS_COUNTER_PACK_MICROBLOCK_PER_BLOCK_LIMIT_OFF (275UL) #define FD_METRICS_COUNTER_PACK_MICROBLOCK_PER_BLOCK_LIMIT_NAME "pack_microblock_per_block_limit" #define FD_METRICS_COUNTER_PACK_MICROBLOCK_PER_BLOCK_LIMIT_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_MICROBLOCK_PER_BLOCK_LIMIT_DESC "The number of times pack did not pack a microblock because the limit on microblocks/block had been reached" -#define FD_METRICS_COUNTER_PACK_DATA_PER_BLOCK_LIMIT_OFF (260UL) +#define FD_METRICS_COUNTER_PACK_DATA_PER_BLOCK_LIMIT_OFF (276UL) #define FD_METRICS_COUNTER_PACK_DATA_PER_BLOCK_LIMIT_NAME "pack_data_per_block_limit" #define FD_METRICS_COUNTER_PACK_DATA_PER_BLOCK_LIMIT_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_DATA_PER_BLOCK_LIMIT_DESC "The number of times pack did not pack a microblock because it reached reached the data per block limit at the start of trying to schedule a microblock" -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_OFF (261UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_OFF (277UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_CNT (6UL) -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_TAKEN_OFF (261UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_TAKEN_OFF (277UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_TAKEN_NAME "pack_transaction_schedule_taken" #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_TAKEN_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_TAKEN_DESC "Result of trying to consider a transaction for scheduling (Pack included the transaction in the microblock)" -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_CU_LIMIT_OFF (262UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_CU_LIMIT_OFF (278UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_CU_LIMIT_NAME "pack_transaction_schedule_cu_limit" #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_CU_LIMIT_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_CU_LIMIT_DESC "Result of trying to consider a transaction for scheduling (Pack skipped the transaction because it would have exceeded the block CU limit)" -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_FAST_PATH_OFF (263UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_FAST_PATH_OFF (279UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_FAST_PATH_NAME "pack_transaction_schedule_fast_path" #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_FAST_PATH_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_FAST_PATH_DESC "Result of trying to consider a transaction for scheduling (Pack skipped the transaction because of account conflicts using the fast bitvector check)" -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_BYTE_LIMIT_OFF (264UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_BYTE_LIMIT_OFF (280UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_BYTE_LIMIT_NAME "pack_transaction_schedule_byte_limit" #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_BYTE_LIMIT_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_BYTE_LIMIT_DESC "Result of trying to consider a transaction for scheduling (Pack skipped the transaction because it would have exceeded the block data size limit)" -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_WRITE_COST_OFF (265UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_WRITE_COST_OFF (281UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_WRITE_COST_NAME "pack_transaction_schedule_write_cost" #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_WRITE_COST_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_WRITE_COST_DESC "Result of trying to consider a transaction for scheduling (Pack skipped the transaction because it would have caused a writable account to exceed the per-account block write cost limit)" -#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_SLOW_PATH_OFF (266UL) +#define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_SLOW_PATH_OFF (282UL) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_SLOW_PATH_NAME "pack_transaction_schedule_slow_path" #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_SLOW_PATH_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_TRANSACTION_SCHEDULE_SLOW_PATH_DESC "Result of trying to consider a transaction for scheduling (Pack skipped the transaction because of account conflicts using the full slow check)" -#define FD_METRICS_COUNTER_PACK_DELETE_MISSED_OFF (267UL) +#define FD_METRICS_COUNTER_PACK_DELETE_MISSED_OFF (283UL) #define FD_METRICS_COUNTER_PACK_DELETE_MISSED_NAME "pack_delete_missed" #define FD_METRICS_COUNTER_PACK_DELETE_MISSED_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_DELETE_MISSED_DESC "Count of attempts to delete a transaction that wasn't found" -#define FD_METRICS_COUNTER_PACK_DELETE_HIT_OFF (268UL) +#define FD_METRICS_COUNTER_PACK_DELETE_HIT_OFF (284UL) #define FD_METRICS_COUNTER_PACK_DELETE_HIT_NAME "pack_delete_hit" #define FD_METRICS_COUNTER_PACK_DELETE_HIT_TYPE (FD_METRICS_TYPE_COUNTER) #define FD_METRICS_COUNTER_PACK_DELETE_HIT_DESC "Count of attempts to delete a transaction that was found and deleted" -#define FD_METRICS_PACK_TOTAL (32UL) +#define FD_METRICS_PACK_TOTAL (48UL) extern const fd_metrics_meta_t FD_METRICS_PACK[FD_METRICS_PACK_TOTAL]; diff --git a/src/disco/metrics/metrics.xml b/src/disco/metrics/metrics.xml index b27ea3c8f1..6c4f211b5d 100644 --- a/src/disco/metrics/metrics.xml +++ b/src/disco/metrics/metrics.xml @@ -50,6 +50,25 @@ metric introduced. + + + + + + + + + + + + + + + + + + + @@ -244,6 +263,7 @@ metric introduced. +