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

Use nanosecond unit for logging execution time #18

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn execute_entry_point_call(
tracing::info!("deprecated vm contract execution started");
let pre_execution_instant = Instant::now();
let result = run_entry_point(&mut runner, &mut syscall_handler, entry_point_pc, args);
let execution_time = pre_execution_instant.elapsed().as_millis();
let execution_time = pre_execution_instant.elapsed().as_nanos();
tracing::info!(time = execution_time, "deprecated vm contract execution finished");
result?;

Expand Down
2 changes: 1 addition & 1 deletion crates/blockifier/src/execution/entry_point_execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn execute_entry_point_call(
let pre_execution_instant = Instant::now();
let result =
run_entry_point(&mut runner, &mut syscall_handler, entry_point, args, program_segment_size);
let execution_time = pre_execution_instant.elapsed().as_millis();
let execution_time = pre_execution_instant.elapsed().as_nanos();
tracing::info!(time = execution_time, "vm contract execution finished");
result?;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn execute_entry_point_call(
} else {
run_native_executor(&contract_class.executor, function_id, call, syscall_handler)
};
let execution_time = pre_execution_instant.elapsed().as_millis();
let execution_time = pre_execution_instant.elapsed().as_nanos();
tracing::info!(time = execution_time, "native contract execution finished");
result
}
Loading