Skip to content

Commit 6f31d1e

Browse files
committed
better logging
1 parent 680ff90 commit 6f31d1e

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/tasks/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ pub mod metrics;
1010
/// Tx submission task
1111
pub mod submit;
1212

13-
/// Constructs the simualtion environment.
13+
/// Constructs the simulation environment.
1414
pub mod env;

src/tasks/submit.rs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ impl SubmitTask {
413413
) -> eyre::Result<ControlFlow> {
414414
let mut retries = 0;
415415
let building_start_time = Instant::now();
416+
416417
let (current_slot, start, end) = self.calculate_slot_window();
417418
debug!(current_slot, start, end, "calculating target slot window");
418419

@@ -467,9 +468,15 @@ impl SubmitTask {
467468
};
468469

469470
// This is reached when `Done` or `Skip` is returned
470-
histogram!("builder.block_build_time")
471-
.record(building_start_time.elapsed().as_millis() as f64);
472-
info!(?result, "finished block building");
471+
let elapsed = building_start_time.elapsed().as_millis() as f64;
472+
histogram!("builder.block_build_time").record(elapsed);
473+
info!(
474+
?result,
475+
tx_count = block.tx_count(),
476+
block_number = block.block_number(),
477+
build_time = ?elapsed,
478+
"finished block building"
479+
);
473480
Ok(result)
474481
}
475482

@@ -508,10 +515,9 @@ impl SubmitTask {
508515
loop {
509516
// Wait to receive a new block
510517
let Some(result) = inbound.recv().await else {
511-
debug!("upstream task gone");
518+
debug!("upstream task gone - exiting submit task");
512519
break;
513520
};
514-
515521
debug!(block_number = result.block.block_number(), "submit channel received block");
516522

517523
// Only attempt each block number once

0 commit comments

Comments
 (0)