Skip to content

Commit 4c6e7af

Browse files
committed
gui: sync metrics sampling
1 parent c236ae9 commit 4c6e7af

File tree

11 files changed

+180
-86
lines changed

11 files changed

+180
-86
lines changed

src/app/fdctl/run/tiles/fd_bank.c

+17-19
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ typedef struct {
4242
ulong txn_load_address_lookup_tables[ 6 ];
4343
ulong transaction_result[ 40 ];
4444
ulong processing_failed;
45+
ulong precompile_verify_failure;
4546
ulong fee_only;
4647
ulong exec_failed;
4748
ulong success;
@@ -68,14 +69,18 @@ scratch_footprint( fd_topo_tile_t const * tile ) {
6869
static inline void
6970
metrics_write( fd_bank_ctx_t * ctx ) {
7071
FD_MCNT_ENUM_COPY( BANK, SLOT_ACQUIRE, ctx->metrics.slot_acquire );
72+
FD_MCNT_ENUM_COPY( BANK, TRANSACTION_RESULT, ctx->metrics.transaction_result );
73+
}
7174

75+
static inline void
76+
metrics_write_fixed_interval( fd_bank_ctx_t * ctx ) {
7277
FD_MCNT_ENUM_COPY( BANK, TRANSACTION_LOAD_ADDRESS_TABLES, ctx->metrics.txn_load_address_lookup_tables );
73-
FD_MCNT_ENUM_COPY( BANK, TRANSACTION_RESULT, ctx->metrics.transaction_result );
7478

75-
FD_MCNT_SET( BANK, PROCESSING_FAILED, ctx->metrics.processing_failed );
76-
FD_MCNT_SET( BANK, FEE_ONLY_TRANSACTIONS, ctx->metrics.fee_only );
77-
FD_MCNT_SET( BANK, EXECUTED_FAILED_TRANSACTIONS, ctx->metrics.exec_failed );
78-
FD_MCNT_SET( BANK, SUCCESSFUL_TRANSACTIONS, ctx->metrics.success );
79+
FD_MCNT_SET( BANK, PROCESSING_FAILED, ctx->metrics.processing_failed );
80+
FD_MCNT_SET( BANK, PRECOMPILE_VERIFY_FAILURE, ctx->metrics.precompile_verify_failure );
81+
FD_MCNT_SET( BANK, FEE_ONLY_TRANSACTIONS, ctx->metrics.fee_only );
82+
FD_MCNT_SET( BANK, EXECUTED_FAILED_TRANSACTIONS, ctx->metrics.exec_failed );
83+
FD_MCNT_SET( BANK, SUCCESSFUL_TRANSACTIONS, ctx->metrics.success );
7984
}
8085

8186
static int
@@ -172,7 +177,7 @@ handle_microblock( fd_bank_ctx_t * ctx,
172177

173178
int precompile_result = fd_ext_bank_verify_precompiles( ctx->_bank, abi_txn );
174179
if( FD_UNLIKELY( precompile_result ) ) {
175-
FD_MCNT_INC( BANK, PRECOMPILE_VERIFY_FAILURE, 1 );
180+
ctx->metrics.precompile_verify_failure++;
176181
continue;
177182
}
178183

@@ -299,12 +304,6 @@ handle_microblock( fd_bank_ctx_t * ctx,
299304
FD_STATIC_ASSERT( MAX_MICROBLOCK_SZ-(MAX_TXN_PER_MICROBLOCK*sizeof(fd_txn_p_t))>=sizeof(fd_microblock_trailer_t), poh_shred_mtu );
300305
FD_STATIC_ASSERT( MAX_MICROBLOCK_SZ-(MAX_TXN_PER_MICROBLOCK*sizeof(fd_txn_p_t))>=sizeof(fd_microblock_bank_trailer_t), poh_shred_mtu );
301306

302-
/* We have a race window with the GUI, where if the slot is ending it
303-
will snap these metrics to draw the waterfall, but see them outdated
304-
because housekeeping hasn't run. For now just update them here, but
305-
PoH should eventually flush the pipeline before ending the slot. */
306-
metrics_write( ctx );
307-
308307
ulong bank_sig = fd_disco_bank_sig( slot, ctx->_microblock_idx );
309308

310309
/* We always need to publish, even if there are no successfully executed
@@ -351,7 +350,7 @@ handle_bundle( fd_bank_ctx_t * ctx,
351350
int precompile_result = fd_ext_bank_verify_precompiles( ctx->_bank, abi_txn );
352351
if( FD_UNLIKELY( precompile_result ) ) {
353352
execution_success = 0;
354-
FD_MCNT_INC( BANK, PRECOMPILE_VERIFY_FAILURE, 1 );
353+
ctx->metrics.precompile_verify_failure++;
355354
continue;
356355
}
357356

@@ -452,8 +451,6 @@ handle_bundle( fd_bank_ctx_t * ctx,
452451
fd_stem_publish( stem, 0UL, bank_sig, ctx->out_chunk, new_sz, 0UL, 0UL, tspub );
453452
ctx->out_chunk = fd_dcache_compact_next( ctx->out_chunk, new_sz, ctx->out_chunk0, ctx->out_wmark );
454453
}
455-
456-
metrics_write( ctx );
457454
}
458455

459456
static inline void
@@ -520,10 +517,11 @@ unprivileged_init( fd_topo_t * topo,
520517
#define STEM_CALLBACK_CONTEXT_TYPE fd_bank_ctx_t
521518
#define STEM_CALLBACK_CONTEXT_ALIGN alignof(fd_bank_ctx_t)
522519

523-
#define STEM_CALLBACK_METRICS_WRITE metrics_write
524-
#define STEM_CALLBACK_BEFORE_FRAG before_frag
525-
#define STEM_CALLBACK_DURING_FRAG during_frag
526-
#define STEM_CALLBACK_AFTER_FRAG after_frag
520+
#define STEM_CALLBACK_FIXED_METRICS_WRITE_INTERVAL metrics_write_fixed_interval
521+
#define STEM_CALLBACK_METRICS_WRITE metrics_write
522+
#define STEM_CALLBACK_BEFORE_FRAG before_frag
523+
#define STEM_CALLBACK_DURING_FRAG during_frag
524+
#define STEM_CALLBACK_AFTER_FRAG after_frag
527525

528526
#include "../../../../disco/stem/fd_stem.c"
529527

src/app/fdctl/run/tiles/fd_bundle.c

+9-4
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,15 @@ during_housekeeping( fd_bundle_ctx_t * ctx ) {
8686

8787
static inline void
8888
metrics_write( fd_bundle_ctx_t * ctx ) {
89-
FD_MCNT_SET( BUNDLE, TRANSACTION_RECEIVED, ctx->metrics.txn_received );
9089
FD_MCNT_SET( BUNDLE, BUNDLE_RECEIVED, ctx->metrics.bundle_received );
9190
FD_MCNT_SET( BUNDLE, PACKET_RECEIVED, ctx->metrics.packet_received );
9291
}
9392

93+
static inline void
94+
metrics_write_fixed_interval( fd_bundle_ctx_t * ctx ) {
95+
FD_MCNT_SET( BUNDLE, TRANSACTION_RECEIVED, ctx->metrics.txn_received );
96+
}
97+
9498
extern void
9599
plugin_bundle_poll( void * plugin,
96100
int reload_identity,
@@ -423,9 +427,10 @@ populate_allowed_fds( fd_topo_t const * topo,
423427
#define STEM_CALLBACK_CONTEXT_TYPE fd_bundle_ctx_t
424428
#define STEM_CALLBACK_CONTEXT_ALIGN alignof(fd_bundle_ctx_t)
425429

426-
#define STEM_CALLBACK_DURING_HOUSEKEEPING during_housekeeping
427-
#define STEM_CALLBACK_METRICS_WRITE metrics_write
428-
#define STEM_CALLBACK_AFTER_CREDIT after_credit
430+
#define STEM_CALLBACK_DURING_HOUSEKEEPING during_housekeeping
431+
#define STEM_CALLBACK_FIXED_METRICS_WRITE_INTERVAL metrics_write_fixed_interval
432+
#define STEM_CALLBACK_METRICS_WRITE metrics_write
433+
#define STEM_CALLBACK_AFTER_CREDIT after_credit
429434

430435
#include "../../../../disco/stem/fd_stem.c"
431436

src/app/fdctl/run/tiles/fd_dedup.c

+15-5
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ typedef struct {
5757
struct {
5858
ulong bundle_peer_failure_cnt;
5959
ulong dedup_fail_cnt;
60+
ulong gossiped_votes_received;
6061
} metrics;
6162
} fd_dedup_ctx_t;
6263

@@ -75,8 +76,16 @@ scratch_footprint( fd_topo_tile_t const * tile ) {
7576

7677
static inline void
7778
metrics_write( fd_dedup_ctx_t * ctx ) {
79+
(void)ctx;
80+
return;
81+
}
82+
83+
static inline void
84+
metrics_write_fixed_interval( fd_dedup_ctx_t * ctx ) {
7885
FD_MCNT_SET( DEDUP, TRANSACTION_BUNDLE_PEER_FAILURE, ctx->metrics.bundle_peer_failure_cnt );
79-
FD_MCNT_SET( DEDUP, TRANSACTION_DEDUP_FAILURE, ctx->metrics.dedup_fail_cnt );
86+
FD_MCNT_SET( DEDUP, TRANSACTION_DEDUP_FAILURE, ctx->metrics.dedup_fail_cnt );
87+
FD_MCNT_SET( DEDUP, GOSSIPED_VOTES_RECEIVED, ctx->metrics.gossiped_votes_received );
88+
8089
}
8190

8291
/* during_frag is called between pairs for sequence number checks, as
@@ -168,7 +177,7 @@ after_frag( fd_dedup_ctx_t * ctx,
168177
txnm->txn_t_sz = (ushort)fd_txn_parse( fd_txn_m_payload( txnm ), txnm->payload_sz, txn, NULL );
169178
if( FD_UNLIKELY( !txnm->txn_t_sz ) ) FD_LOG_ERR(( "fd_txn_parse failed for vote transactions that should have been sigverified" ));
170179

171-
if( FD_UNLIKELY( ctx->in_kind[ in_idx ]==IN_KIND_GOSSIP ) ) FD_MCNT_INC( DEDUP, GOSSIPED_VOTES_RECEIVED, 1UL );
180+
if( FD_UNLIKELY( ctx->in_kind[ in_idx ]==IN_KIND_GOSSIP ) ) ctx->metrics.gossiped_votes_received++;
172181
}
173182

174183
int is_dup = 0;
@@ -301,9 +310,10 @@ populate_allowed_fds( fd_topo_t const * topo,
301310
#define STEM_CALLBACK_CONTEXT_TYPE fd_dedup_ctx_t
302311
#define STEM_CALLBACK_CONTEXT_ALIGN alignof(fd_dedup_ctx_t)
303312

304-
#define STEM_CALLBACK_METRICS_WRITE metrics_write
305-
#define STEM_CALLBACK_DURING_FRAG during_frag
306-
#define STEM_CALLBACK_AFTER_FRAG after_frag
313+
#define STEM_CALLBACK_FIXED_METRICS_WRITE_INTERVAL metrics_write_fixed_interval
314+
#define STEM_CALLBACK_METRICS_WRITE metrics_write
315+
#define STEM_CALLBACK_DURING_FRAG during_frag
316+
#define STEM_CALLBACK_AFTER_FRAG after_frag
307317

308318
#include "../../../../disco/stem/fd_stem.c"
309319

src/app/fdctl/run/tiles/fd_gossip.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ metrics_write( fd_gossip_tile_ctx_t * ctx ) {
11901190
#define STEM_CALLBACK_BEFORE_FRAG before_frag
11911191
#define STEM_CALLBACK_DURING_FRAG during_frag
11921192
#define STEM_CALLBACK_AFTER_FRAG after_frag
1193-
#define STEM_CALLBACK_METRICS_WRITE metrics_write
1193+
#define STEM_CALLBACK_FIXED_METRICS_WRITE metrics_write
11941194

11951195
#include "../../../../disco/stem/fd_stem.c"
11961196

src/app/fdctl/run/tiles/fd_pack.c

+40-17
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ typedef struct {
192192
increases, we expire old transactions. */
193193
ulong highest_observed_slot;
194194

195+
ulong transaction_expired;
196+
195197
/* microblock_duration_ns, and wait_duration
196198
respectively scaled to be in ticks instead of nanoseconds */
197199
ulong microblock_duration_ticks;
@@ -203,6 +205,9 @@ typedef struct {
203205
full. This is an fd_deque. */
204206
fd_txn_e_t * extra_txn_deq;
205207
int insert_to_extra; /* whether the last insert was into pack or the extra deq */
208+
ulong transaction_dropped_from_extra;,
209+
ulong transaction_inserted_from_extra;,
210+
ulong transaction_inserted_to_extra;
206211
#endif
207212

208213
fd_pack_in_ctx_t in[ 32 ];
@@ -250,6 +255,8 @@ typedef struct {
250255
fd_txn_e_t * const * bundle; /* points to _txn when non-NULL */
251256
} current_bundle[1];
252257

258+
ulong partial_bundle_dropped_txn_cnt;
259+
253260
block_builder_info_t blk_engine_cfg[1];
254261

255262
struct {
@@ -358,9 +365,7 @@ log_end_block_metrics( fd_pack_ctx_t * ctx,
358365

359366
static inline void
360367
metrics_write( fd_pack_ctx_t * ctx ) {
361-
FD_MCNT_ENUM_COPY( PACK, TRANSACTION_INSERTED, ctx->insert_result );
362368
FD_MCNT_ENUM_COPY( PACK, METRIC_TIMING, ((ulong*)ctx->metric_timing) );
363-
FD_MCNT_ENUM_COPY( PACK, BUNDLE_CRANK_STATUS, ctx->crank->metrics );
364369
FD_MHIST_COPY( PACK, SCHEDULE_MICROBLOCK_DURATION_SECONDS, ctx->schedule_duration );
365370
FD_MHIST_COPY( PACK, NO_SCHED_MICROBLOCK_DURATION_SECONDS, ctx->no_sched_duration );
366371
FD_MHIST_COPY( PACK, INSERT_TRANSACTION_DURATION_SECONDS, ctx->insert_duration );
@@ -369,6 +374,22 @@ metrics_write( fd_pack_ctx_t * ctx ) {
369374
fd_pack_metrics_write( ctx->pack );
370375
}
371376

377+
static inline void
378+
metrics_write_fixed_interval( fd_pack_ctx_t * ctx ) {
379+
FD_MCNT_ENUM_COPY( PACK, TRANSACTION_INSERTED, ctx->insert_result );
380+
FD_MCNT_SET( PACK, TRANSACTION_EXPIRED, ctx->transaction_expired );
381+
FD_MCNT_ENUM_COPY( PACK, BUNDLE_CRANK_STATUS, ctx->crank->metrics );
382+
FD_MCNT_INC( PACK, TRANSACTION_DROPPED_PARTIAL_BUNDLE, ctx->partial_bundle_dropped_txn_cnt );
383+
384+
#if FD_PACK_USE_EXTRA_STORAGE
385+
FD_MCNT_SET( PACK, TRANSACTION_DROPPED_FROM_EXTRA, ctx->transaction_dropped_from_extra );
386+
FD_MCNT_SET( PACK, TRANSACTION_INSERTED_FROM_EXTRA, ctx->transaction_inserted_from_extra );
387+
FD_MCNT_SET( PACK, TRANSACTION_INSERTED_TO_EXTRA, ctx->transaction_inserted_to_extra );
388+
#endif
389+
390+
fd_pack_metrics_fixed_int_write(ctx->pack);
391+
}
392+
372393
static inline void
373394
during_housekeeping( fd_pack_ctx_t * ctx ) {
374395
ctx->approx_wallclock_ns = fd_log_wallclock();
@@ -428,7 +449,7 @@ insert_from_extra( fd_pack_ctx_t * ctx ) {
428449
insert_duration += fd_tickcount();
429450
ctx->insert_result[ result + FD_PACK_INSERT_RETVAL_OFF ]++;
430451
fd_histf_sample( ctx->insert_duration, (ulong)insert_duration );
431-
FD_MCNT_INC( PACK, TRANSACTION_INSERTED_FROM_EXTRA, 1UL );
452+
ctx->transaction_inserted_from_extra++;
432453
return result;
433454
}
434455
#endif
@@ -747,8 +768,7 @@ during_frag( fd_pack_ctx_t * ctx,
747768
}
748769
ctx->leader_slot = fd_disco_poh_sig_slot( sig );
749770

750-
ulong exp_cnt = fd_pack_expire_before( ctx->pack, fd_ulong_max( ctx->leader_slot, TRANSACTION_LIFETIME_SLOTS )-TRANSACTION_LIFETIME_SLOTS );
751-
FD_MCNT_INC( PACK, TRANSACTION_EXPIRED, exp_cnt );
771+
ctx->transaction_expired += fd_pack_expire_before( ctx->pack, fd_ulong_max( ctx->leader_slot, TRANSACTION_LIFETIME_SLOTS )-TRANSACTION_LIFETIME_SLOTS );
752772

753773
fd_became_leader_t * became_leader = (fd_became_leader_t *)dcache_entry;
754774
ctx->leader_bank = became_leader->bank;
@@ -817,16 +837,15 @@ during_frag( fd_pack_ctx_t * ctx,
817837
with expired but high-fee-paying transactions. That can only
818838
happen if we are getting transactions. */
819839
ctx->highest_observed_slot = sig;
820-
ulong exp_cnt = fd_pack_expire_before( ctx->pack, fd_ulong_max( ctx->highest_observed_slot, TRANSACTION_LIFETIME_SLOTS )-TRANSACTION_LIFETIME_SLOTS );
821-
FD_MCNT_INC( PACK, TRANSACTION_EXPIRED, exp_cnt );
840+
ctx->transaction_expired += fd_pack_expire_before( ctx->pack, fd_ulong_max( ctx->highest_observed_slot, TRANSACTION_LIFETIME_SLOTS )-TRANSACTION_LIFETIME_SLOTS );
822841
}
823842

824843

825844
if( FD_UNLIKELY( txnm->block_engine.bundle_id ) ) {
826845
ctx->is_bundle = 1;
827846
if( FD_LIKELY( txnm->block_engine.bundle_id!=ctx->current_bundle->id ) ) {
828847
if( FD_UNLIKELY( ctx->current_bundle->bundle ) ) {
829-
FD_MCNT_INC( PACK, TRANSACTION_DROPPED_PARTIAL_BUNDLE, ctx->current_bundle->txn_received );
848+
ctx->partial_bundle_dropped_txn_cnt += ctx->current_bundle->txn_received;
830849
fd_pack_insert_bundle_cancel( ctx->pack, ctx->current_bundle->bundle, ctx->current_bundle->txn_cnt );
831850
}
832851
ctx->current_bundle->id = txnm->block_engine.bundle_id;
@@ -835,7 +854,7 @@ during_frag( fd_pack_ctx_t * ctx,
835854
ctx->current_bundle->txn_received = 0UL;
836855

837856
if( FD_UNLIKELY( ctx->current_bundle->txn_cnt==0UL ) ) {
838-
FD_MCNT_INC( PACK, TRANSACTION_DROPPED_PARTIAL_BUNDLE, 1UL );
857+
ctx->partial_bundle_dropped_txn_cnt++;
839858
ctx->current_bundle->id = 0UL;
840859
return;
841860
}
@@ -857,15 +876,15 @@ during_frag( fd_pack_ctx_t * ctx,
857876
} else {
858877
if( FD_UNLIKELY( extra_txn_deq_full( ctx->extra_txn_deq ) ) ) {
859878
extra_txn_deq_remove_head( ctx->extra_txn_deq );
860-
FD_MCNT_INC( PACK, TRANSACTION_DROPPED_FROM_EXTRA, 1UL );
879+
ctx->transaction_dropped_from_extra++;
861880
}
862881
ctx->cur_spot = extra_txn_deq_peek_tail( extra_txn_deq_insert_tail( ctx->extra_txn_deq ) );
863882
/* We want to store the current time in cur_spot so that we can
864883
track its expiration better. We just stash it in the CU
865884
fields, since those aren't important right now. */
866885
ctx->cur_spot->txnp->blockhash_slot = sig;
867886
ctx->insert_to_extra = 1;
868-
FD_MCNT_INC( PACK, TRANSACTION_INSERTED_TO_EXTRA, 1UL );
887+
ctx->transaction_inserted_to_extra++;
869888
}
870889
#else
871890
ctx->cur_spot = fd_pack_insert_txn_init( ctx->pack );
@@ -1094,9 +1113,12 @@ unprivileged_init( fd_topo_t * topo,
10941113
ctx->ticks_per_ns = fd_tempo_tick_per_ns( NULL );
10951114
ctx->last_successful_insert = 0L;
10961115
ctx->highest_observed_slot = 0UL;
1116+
ctx->transaction_expired = 0UL;
10971117
ctx->microblock_duration_ticks = (ulong)(fd_tempo_tick_per_ns( NULL )*(double)MICROBLOCK_DURATION_NS + 0.5);
10981118
#if FD_PACK_USE_EXTRA_STORAGE
10991119
ctx->insert_to_extra = 0;
1120+
ctx->transaction_dropped_from_extra= 0UL;
1121+
ctx->transaction_inserted_to_extra = 0UL;
11001122
#endif
11011123
ctx->use_consumed_cus = tile->pack.use_consumed_cus;
11021124
ctx->crank->enabled = tile->pack.bundle.enabled;
@@ -1204,12 +1226,13 @@ populate_allowed_fds( fd_topo_t const * topo,
12041226
#define STEM_CALLBACK_CONTEXT_TYPE fd_pack_ctx_t
12051227
#define STEM_CALLBACK_CONTEXT_ALIGN alignof(fd_pack_ctx_t)
12061228

1207-
#define STEM_CALLBACK_DURING_HOUSEKEEPING during_housekeeping
1208-
#define STEM_CALLBACK_BEFORE_CREDIT before_credit
1209-
#define STEM_CALLBACK_AFTER_CREDIT after_credit
1210-
#define STEM_CALLBACK_DURING_FRAG during_frag
1211-
#define STEM_CALLBACK_AFTER_FRAG after_frag
1212-
#define STEM_CALLBACK_METRICS_WRITE metrics_write
1229+
#define STEM_CALLBACK_DURING_HOUSEKEEPING during_housekeeping
1230+
#define STEM_CALLBACK_BEFORE_CREDIT before_credit
1231+
#define STEM_CALLBACK_AFTER_CREDIT after_credit
1232+
#define STEM_CALLBACK_DURING_FRAG during_frag
1233+
#define STEM_CALLBACK_AFTER_FRAG after_frag
1234+
#define STEM_CALLBACK_FIXED_METRICS_WRITE_INTERVAL metrics_write_fixed_interval
1235+
#define STEM_CALLBACK_METRICS_WRITE metrics_write
12131236

12141237
#include "../../../../disco/stem/fd_stem.c"
12151238

src/app/fdctl/run/tiles/fd_resolv.c

+15-7
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ typedef struct {
136136

137137
struct {
138138
ulong lut[ FD_METRICS_COUNTER_RESOLV_LUT_RESOLVED_CNT ];
139+
ulong no_bank_drop;
139140
ulong blockhash_expired;
140141
ulong blockhash_unknown;
141142
ulong bundle_peer_failure_cnt;
@@ -178,7 +179,13 @@ fd_ext_resolv_tile_cnt( void ) {
178179

179180
static inline void
180181
metrics_write( fd_resolv_ctx_t * ctx ) {
182+
(void) ctx;
183+
}
184+
185+
static inline void
186+
metrics_write_fixed_interval( fd_resolv_ctx_t * ctx ) {
181187
FD_MCNT_SET( RESOLV, BLOCKHASH_EXPIRED, ctx->metrics.blockhash_expired );
188+
FD_MCNT_SET( RESOLV, NO_BANK_DROP, ctx->metrics.no_bank_drop );
182189
FD_MCNT_ENUM_COPY( RESOLV, LUT_RESOLVED, ctx->metrics.lut );
183190
FD_MCNT_ENUM_COPY( RESOLV, STASH_OPERATION, ctx->metrics.stash );
184191
FD_MCNT_SET( RESOLV, TRANSACTION_BUNDLE_PEER_FAILURE, ctx->metrics.bundle_peer_failure_cnt );
@@ -237,7 +244,7 @@ publish_txn( fd_resolv_ctx_t * ctx,
237244

238245
if( FD_UNLIKELY( txnt->addr_table_adtl_cnt ) ) {
239246
if( FD_UNLIKELY( !ctx->root_bank ) ) {
240-
FD_MCNT_INC( RESOLV, NO_BANK_DROP, 1 );
247+
ctx->metrics.no_bank_drop++;
241248
return 0;
242249
} else {
243250
int result = fd_bank_abi_resolve_address_lookup_tables( ctx->root_bank, 0, ctx->root_slot, txnt, fd_txn_m_payload( txnm ), fd_txn_m_alut( txnm ) );
@@ -430,7 +437,7 @@ after_frag( fd_resolv_ctx_t * ctx,
430437

431438
if( FD_UNLIKELY( txnt->addr_table_adtl_cnt ) ) {
432439
if( FD_UNLIKELY( !ctx->root_bank ) ) {
433-
FD_MCNT_INC( RESOLV, NO_BANK_DROP, 1 );
440+
ctx->metrics.no_bank_drop++;
434441
if( FD_UNLIKELY( txnm->block_engine.bundle_id ) ) ctx->bundle_failed = 1;
435442
return;
436443
}
@@ -517,11 +524,12 @@ unprivileged_init( fd_topo_t * topo,
517524
#define STEM_CALLBACK_CONTEXT_TYPE fd_resolv_ctx_t
518525
#define STEM_CALLBACK_CONTEXT_ALIGN alignof(fd_resolv_ctx_t)
519526

520-
#define STEM_CALLBACK_METRICS_WRITE metrics_write
521-
#define STEM_CALLBACK_AFTER_CREDIT after_credit
522-
#define STEM_CALLBACK_BEFORE_FRAG before_frag
523-
#define STEM_CALLBACK_DURING_FRAG during_frag
524-
#define STEM_CALLBACK_AFTER_FRAG after_frag
527+
#define STEM_CALLBACK_METRICS_WRITE metrics_write
528+
#define STEM_CALLBACK_FIXED_METRICS_WRITE_INTERVAL metrics_write_fixed_interval
529+
#define STEM_CALLBACK_AFTER_CREDIT after_credit
530+
#define STEM_CALLBACK_BEFORE_FRAG before_frag
531+
#define STEM_CALLBACK_DURING_FRAG during_frag
532+
#define STEM_CALLBACK_AFTER_FRAG after_frag
525533

526534
#include "../../../../disco/stem/fd_stem.c"
527535

0 commit comments

Comments
 (0)