Skip to content
This repository has been archived by the owner on Feb 6, 2025. It is now read-only.

Commit

Permalink
feat: add mgasps log
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Apr 30, 2024
1 parent 72be534 commit 25224ec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/node/events/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ impl<DB> NodeState<DB> {
peers=self.num_connected_peers(),
txs=block.body.len(),
mgas=%format!("{:.3}", block.header.gas_used as f64 / constants::MGAS_TO_GAS as f64),
mgasps=%format!("{:.3}", block.header.gas_used as f64 * 1000.0 / elapsed.as_secs_f64() / constants::MGAS_TO_GAS as f64),
full=%format!("{:.1}%", block.header.gas_used as f64 * 100.0 / block.header.gas_limit as f64),
base_fee=%format!("{:.2}gwei", block.header.base_fee_per_gas.unwrap_or(0) as f64 / constants::GWEI_TO_WEI as f64),
blobs=block.header.blob_gas_used.unwrap_or(0) / constants::eip4844::DATA_GAS_PER_BLOB,
Expand Down

0 comments on commit 25224ec

Please sign in to comment.