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

[PH] Performance harness Log Number of Forks and Forked Blocks #618

Conversation

ClaytonCalabrese
Copy link
Contributor

PH now uses nodeos logs to report forks and forked blocks during performance testing.

@@ -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]))
Copy link
Member

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.

Copy link
Contributor Author

@ClaytonCalabrese ClaytonCalabrese Jan 5, 2023

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.

Copy link
Member

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)

@ClaytonCalabrese ClaytonCalabrese merged commit 95ebafb into feature_performance_harness_stage_2 Jan 9, 2023
@ClaytonCalabrese ClaytonCalabrese deleted the performance_harness_log_forks branch January 9, 2023 17:10
@oschwaldp-oci oschwaldp-oci added the OCI Work exclusive to OCI team label Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants