Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log detailed timing of block creation steps #6880

Merged
merged 5 commits into from
Apr 8, 2024

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Apr 4, 2024

PR description

if log level is at debug, detailed timing of block creation steps are logged, along with the standard block info.

Log will look like this:

2024-04-05 10:54:46.962+00:00 | MinerExecutor | INFO  | BlockMiner | Produced #260,775 / 63 tx / 0 om / 1,577,124 (2.6%) gas / (0xb6907722d13c36fb54747d11f4b7c734d6b57035ca1a3428e4b5c9f347644b63) in 0.000s, timing [Started at 2024-04-05T10:54:46.693633274Z, protocolWait=254ms, duplicateWorldState=0ms, preTxsSelection=3ms, txsSelection=9ms, blockAssembled=1ms, importingBlock=0ms, notifyListeners=0ms, log=0ms]

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 marked this pull request as ready for review April 4, 2024 15:37
@macfarla
Copy link
Contributor

macfarla commented Apr 5, 2024

@fab-10 what does the PT signify before the number eg protocolWait=PT0.199224809S,

also is S for seconds? I think lower case s is easier to read with numbers

@fab-10
Copy link
Contributor Author

fab-10 commented Apr 5, 2024

@fab-10 what does the PT signify before the number eg protocolWait=PT0.199224809S,

also is S for seconds? I think lower case s is easier to read with numbers

just using the default Duration.toString() but I agree that for so short duration could not be very readable, will propose another format, that works with millis

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10
Copy link
Contributor Author

fab-10 commented Apr 5, 2024

@macfarla updated to look like this one:

protocolWait=254ms, duplicateWorldState=0ms, preTxsSelection=3ms, txsSelection=9ms, blockAssembled=1ms

@fab-10 fab-10 enabled auto-merge (squash) April 8, 2024 09:51
@fab-10 fab-10 merged commit 8064da0 into hyperledger:main Apr 8, 2024
42 checks passed
@fab-10 fab-10 deleted the block-creation-timing branch April 8, 2024 12:00
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: amsmota <antonio.mota@citi.com>
amsmota pushed a commit to Citi/besu that referenced this pull request Apr 16, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: amsmota <antonio.mota@citi.com>
macfarla pushed a commit to macfarla/besu that referenced this pull request Apr 26, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants