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 timers to benchmark feature #38

Merged
merged 3 commits into from
Aug 15, 2024
Merged

Add timers to benchmark feature #38

merged 3 commits into from
Aug 15, 2024

Conversation

JulianGCalderon
Copy link
Contributor

@JulianGCalderon JulianGCalderon commented Aug 12, 2024

Times the execution of each transactions in the bench-block-range command, and changes the log subscriber to use json format (only with benchmark feature):

{"timestamp":"2024-08-12T18:31:46.409997Z","level":"INFO","fields":{"message":"fetching block range data"},"target":"replay","span":{"name":"caching block range"},"spans":[{"name":"caching block range"}]}
{"timestamp":"2024-08-12T18:34:49.390927Z","level":"INFO","fields":{"message":"filling up execution cache"},"target":"replay","span":{"name":"caching block range"},"spans":[{"name":"caching block range"}]}
{"timestamp":"2024-08-12T18:34:49.391127Z","level":"INFO","fields":{"message":"starting block execution"},"target":"replay::benchmark","span":{"block_number":630029,"name":"block execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"}]}
{"timestamp":"2024-08-12T18:34:49.391256Z","level":"INFO","fields":{"message":"starting tx execution"},"target":"replay::benchmark","span":{"transaction_hash":"0x03bc71812b149182572ea27712dc29c2d2e03811b9b1deb291490ae7bd6cee22","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x03bc71812b149182572ea27712dc29c2d2e03811b9b1deb291490ae7bd6cee22","name":"tx execution"}]}
{"timestamp":"2024-08-12T18:36:41.201101Z","level":"INFO","fields":{"message":"tx execution status","succeeded":true},"target":"replay::benchmark","span":{"transaction_hash":"0x03bc71812b149182572ea27712dc29c2d2e03811b9b1deb291490ae7bd6cee22","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x03bc71812b149182572ea27712dc29c2d2e03811b9b1deb291490ae7bd6cee22","name":"tx execution"}]}
{"timestamp":"2024-08-12T18:36:41.201576Z","level":"INFO","fields":{"message":"finished tx execution","time":"111.812214833s"},"target":"replay::benchmark","span":{"transaction_hash":"0x03bc71812b149182572ea27712dc29c2d2e03811b9b1deb291490ae7bd6cee22","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x03bc71812b149182572ea27712dc29c2d2e03811b9b1deb291490ae7bd6cee22","name":"tx execution"}]}
{"timestamp":"2024-08-12T18:36:41.202011Z","level":"INFO","fields":{"message":"starting tx execution"},"target":"replay::benchmark","span":{"transaction_hash":"0x00b031e464d16e6d3fbeb8c33f7f8171ad8116395bbb3b97b94922f46db895a3","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x00b031e464d16e6d3fbeb8c33f7f8171ad8116395bbb3b97b94922f46db895a3","name":"tx execution"}]}
{"timestamp":"2024-08-12T18:38:25.154610Z","level":"INFO","fields":{"message":"tx execution status","succeeded":false},"target":"replay::benchmark","span":{"transaction_hash":"0x00b031e464d16e6d3fbeb8c33f7f8171ad8116395bbb3b97b94922f46db895a3","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x00b031e464d16e6d3fbeb8c33f7f8171ad8116395bbb3b97b94922f46db895a3","name":"tx execution"}]}
{"timestamp":"2024-08-12T18:38:25.155077Z","level":"INFO","fields":{"message":"finished tx execution","time":"103.954775917s"},"target":"replay::benchmark","span":{"transaction_hash":"0x00b031e464d16e6d3fbeb8c33f7f8171ad8116395bbb3b97b94922f46db895a3","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x00b031e464d16e6d3fbeb8c33f7f8171ad8116395bbb3b97b94922f46db895a3","name":"tx execution"}]}
{"timestamp":"2024-08-12T18:38:25.155497Z","level":"INFO","fields":{"message":"starting tx execution"},"target":"replay::benchmark","span":{"transaction_hash":"0x041979fce8f83ae3855fe3ae9b4168a57a874a224e41997beecffa7745052786","name":"tx execution"},"spans":[{"name":"caching block range"},{"block_number":630029,"name":"block execution"},{"transaction_hash":"0x041979fce8f83ae3855fe3ae9b4168a57a874a224e41997beecffa7745052786","name":"tx execution"}]}

@JulianGCalderon JulianGCalderon marked this pull request as ready for review August 12, 2024 18:42
Copy link
Collaborator

@pefontana pefontana left a comment

Choose a reason for hiding this comment

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

Nice one!

Copy link
Contributor

@FrancoGiachetta FrancoGiachetta left a comment

Choose a reason for hiding this comment

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

LGTM!

@pefontana pefontana added this pull request to the merge queue Aug 15, 2024
Merged via the queue into main with commit 9420b40 Aug 15, 2024
4 checks passed
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.

3 participants