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

[1.0.2] Fix incorrect reported total time of applying a received block or produced block #837

Merged
merged 4 commits into from
Sep 30, 2024

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Sep 30, 2024

Ported fix from main for incorrect reported total time of applying a received block or produced block.

Only minimum required changes were made, except adding time unit us for elapsed and time for better clarity because latency already had ms as postfix.

Before the change:
info 2024-09-30T14:33:33.415 nodeos controller.cpp:3633 log_applied ] Received block bcd746757a3db674... #366563000 @ 2024-08-04T19:14:51.500 signed by eosusacartel [trxs: 0, lib: 366562668, net: 0, cpu: 100, elapsed: 259, time: 869, latency: 4907921915 ms

After the change:
info 2024-09-30T14:35:11.723 nodeos controller.cpp:3627 log_applied ] Received block bcd746757a3db674... #366563000 @ 2024-08-04T19:14:51.500 signed by eosusacartel [trxs: 0, lib: 366562668, net: 0, cpu: 100, elapsed: 258 us, time: 554 us, latency: 4908020223 ms]

Resolves #828

libraries/chain/controller.cpp Outdated Show resolved Hide resolved
@linh2931 linh2931 requested a review from heifner September 30, 2024 16:38
@arhag arhag linked an issue Sep 30, 2024 that may be closed by this pull request
@linh2931 linh2931 merged commit 1440dc1 into release/1.0 Sep 30, 2024
36 checks passed
@linh2931 linh2931 deleted the totaltime_fix branch September 30, 2024 18:48

ilog("Produced block ${id}... #${n} @ ${t} signed by ${p} "
"[trxs: ${count}, lib: ${lib}${confs}, net: ${net}, cpu: ${cpu}, elapsed: ${et}, time: ${tt}]",
"[trxs: ${count}, lib: ${lib}${confs}, net: ${net}, cpu: ${cpu}, elapsed: ${et} us, time: ${tt} us]",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to only add us to "elapsed" and "time" but not "cpu"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this. There was no reason. I overlooked cpu. Will add us in a future PR.

@ericpassmore ericpassmore added the bug The product is not working as was intended. label Oct 1, 2024
@ericpassmore
Copy link
Contributor

Note:start
category: Other
component: Internal
summary: Improve reported time for receiving and applying blocks.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The product is not working as was intended.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Received block reported time incorrect
5 participants