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

Add clash count to benchmarks #42

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

FrancoGiachetta
Copy link
Contributor

@FrancoGiachetta FrancoGiachetta commented Sep 3, 2024

This PR adds the class hash call to the logs for each transaction, with its entrypoint, during block range's benchmark execution.

{"timestamp":"2024-09-05T13:37:52.754794Z","level":"INFO","fields":{"message":"finished tx execution","time":"13.950873625s"},"target":"replay::benchmark","span":{"class_hash_called":"0x3131fa018d520a037686ce3efddeab8f28895662f019ca3ca18a626650f7d1e","entry_point_used":"0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad","transaction_hash":"139602690545065343768301486723194920031895487956458237324480318165151840881","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":633333,"name":"block execution"},{"class_hash_called":"0x3131fa018d520a037686ce3efddeab8f28895662f019ca3ca18a626650f7d1e","entry_point_used":"0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad","transaction_hash":"139602690545065343768301486723194920031895487956458237324480318165151840881","name":"tx execution"}]}

Copy link

github-actions bot commented Sep 4, 2024

✅ Code is now correctly formatted.

Copy link
Contributor

@JulianGCalderon JulianGCalderon left a comment

Choose a reason for hiding this comment

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

Right now, the class_hash and entry_point information are only associated to the execution summary and, if we ever want to analyze and plot this information) there is no easy way to link them to the execution time (they are in different events on the same span).

I think it's better if, instead, you record that information into the span (_tx_span). If there is a way to get the class hash and the entry point before the execution, you can add it directly, if this is not possible, you can use this method: https://docs.rs/tracing/latest/tracing/struct.Span.html#method.record to record it afterwards.

Ask me If you have any questions about this.

@FrancoGiachetta
Copy link
Contributor Author

Might be a way to gather the entrypoint through the transaction's calldata. But I think it´s more redable to leave as it is now and use that record method you were talking about.

@JulianGCalderon
Copy link
Contributor

@FrancoGiachetta can you resolve the conflicts on this branch?

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