File tree Expand file tree Collapse file tree 2 files changed +5
-13
lines changed
crates/chain-orchestrator/src Expand file tree Collapse file tree 2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 2727 with :
2828 cache-on-failure : true
2929 - name : Run clippy
30- run : cargo clean && cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
30+ run : cargo clippy --workspace --lib --examples --tests --benches --all-features --locked
3131 env :
3232 RUSTFLAGS : -D warnings
3333
Original file line number Diff line number Diff line change @@ -28,23 +28,15 @@ impl MetricsHandler {
2828
2929 /// The duration of the current block building task if any.
3030 pub ( crate ) fn finish_no_empty_block_building_recording ( & mut self ) {
31- let duration = self
32- . block_building_meter
33- . block_building_start
34- . take ( )
35- . map ( |block_building_start| block_building_start. elapsed ( ) ) ;
36- if let Some ( duration) = duration {
31+ if let Some ( block_build_start) = self . block_building_meter . block_building_start {
32+ let duration = block_build_start. elapsed ( ) ;
3733 self . block_building_meter . metric . block_building_duration . record ( duration. as_secs_f64 ( ) ) ;
3834 }
3935 }
4036
4137 pub ( crate ) fn finish_all_block_building_recording ( & mut self ) {
42- let duration = self
43- . block_building_meter
44- . block_building_start
45- . take ( )
46- . map ( |block_building_start| block_building_start. elapsed ( ) ) ;
47- if let Some ( duration) = duration {
38+ if let Some ( block_build_start) = self . block_building_meter . block_building_start {
39+ let duration = block_build_start. elapsed ( ) ;
4840 self . block_building_meter
4941 . metric
5042 . all_block_building_duration
You can’t perform that action at this time.
0 commit comments