1#[macro_export]
2macro_rules! bench_sbf_start {
3 ($custom_msg:literal) => {
4 #[cfg(all(target_os = "solana", feature = "bench-sbf"))]
6 {
7 light_heap::GLOBAL_ALLOCATOR
9 .log_total_heap(format!("{}_start_bench_cu", $custom_msg).as_str());
10 anchor_lang::solana_program::log::sol_log_compute_units();
12 }
13 };
14}
15
16#[macro_export]
17macro_rules! bench_sbf_end {
18 ($custom_msg:literal) => {
19 #[cfg(all(target_os = "solana", feature = "bench-sbf"))]
21 {
22 anchor_lang::solana_program::log::sol_log_compute_units();
23 light_heap::GLOBAL_ALLOCATOR
25 .log_total_heap(format!("{}_end_bench_cu", $custom_msg).as_str());
26 }
28 };
29}