Skip to content

Commit

Permalink
Change block miner log to include all the performance number on one l…
Browse files Browse the repository at this point in the history
…ine with Info level (#6939)

Signed-off-by: Ameziane H <ameziane.hamlat@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
  • Loading branch information
ahamlat and macfarla authored Apr 15, 2024
1 parent b67ad69 commit da03bf2
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,15 @@ protected boolean mineBlock() throws InterruptedException {
private void logProducedBlock(final Block block, final BlockCreationTiming blockCreationTiming) {
LOG.info(
String.format(
"Produced #%,d / %d tx / %d om / %,d (%01.1f%%) gas / (%s) in %01.3fs",
"Produced #%,d / %d tx / %d om / %,d (%01.1f%%) gas / (%s) in %01.3fs / Timing(%s)",
block.getHeader().getNumber(),
block.getBody().getTransactions().size(),
block.getBody().getOmmers().size(),
block.getHeader().getGasUsed(),
(block.getHeader().getGasUsed() * 100.0) / block.getHeader().getGasLimit(),
block.getHash(),
blockCreationTiming.end("log").toMillis() / 1000.0));

LOG.debug("Timing #{} / {}", block.getHeader().getNumber(), blockCreationTiming);
blockCreationTiming.end("log").toMillis() / 1000.0,
blockCreationTiming));
}

public void cancel() {
Expand Down

0 comments on commit da03bf2

Please sign in to comment.