-
Notifications
You must be signed in to change notification settings - Fork 73
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
[PH] Performance harness Log Number of Forks and Forked Blocks #618
[PH] Performance harness Log Number of Forks and Forked Blocks #618
Conversation
@@ -200,6 +202,9 @@ def scrapeLog(data, path): | |||
data.updateTotal(int(value[2]), 0, 0, 0, 0, int(v2Logging[0])) | |||
else: | |||
print("Error: Unknown log format") | |||
forks = re.findall(r'switching forks from ([0-9a-fA-F]+) \(block number (\d+)\) to ([0-9a-fA-F]+) \(block number (\d+)\)', line) | |||
for fork in forks: | |||
data.forkedBlocks.append(int(fork[1]) - int(fork[3])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs a +1
. Example:
info 2022-12-28T18:06:18.000 nodeos controller.cpp:2309 maybe_switch_forks ] switching forks from 000000ddca004dc9992db186880efea4908850901e21999ae0861d2dc9916402 (block number 221) to 000000dd705ab2c8b1a3d527c691ae98ad904e3b49b1f3d45ae9ae09fd22e6be (block number 221)
Also want to track # of times a fork happens separately from total fork distance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# of times a fork happens is done using len(data.forkedBlocks) so it doesn't need to be saved here unless I'm missing something. I'll add the +1 because what you said makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, missed the len(data.forkedBlocks)
PH now uses nodeos logs to report forks and forked blocks during performance testing.