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
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions replay/src/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ pub fn execute_block_range(block_range_data: &mut Vec<BlockCachedData>) {
transaction_hash = transaction_hash.to_string(),
)
.entered();
info!("starting tx execution");

info!("starting tx execution");
let pre_execution_instant = Instant::now();
let result = execute_tx_with_blockifier(
&mut transactional_state,
Expand All @@ -108,10 +108,25 @@ pub fn execute_block_range(block_range_data: &mut Vec<BlockCachedData>) {

match result {
Ok(info) => {
info!(
succeeded = info.revert_error.is_none(),
"tx execution status"
)
match info.execute_call_info {
Some(call) => {
let class_hash = call.call.class_hash.unwrap().to_hex_string();
let entry_point = call.call.entry_point_selector.0.to_hex_string();

info!(
succeeded = info.revert_error.is_none(),
class_hash_called = class_hash,
entry_point_used = entry_point,
"tx execution summary"
);
}
None => info!(
succeeded = info.revert_error.is_none(),
class_hash_called = "none",
entry_point_used = "none",
"tx execution summary"
),
};
}
Err(_) => error!(
transaction_hash = transaction_hash.to_string(),
Expand Down
2 changes: 1 addition & 1 deletion replay/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ fn main() {
info!("fetching block range data");
let mut block_range_data = fetch_block_range_data(block_start, block_end, chain);

// We must execute the block range once first to ensure that all data required by blockifier is chached
// We must execute the block range once first to ensure that all data required by blockifier is cached
info!("filling up execution cache");
execute_block_range(&mut block_range_data);

Expand Down