Skip to main content

neo_bench

Attribute Macro neo_bench 

Source
#[neo_bench]
Expand description

Neo N3 Benchmark macro

This macro generates benchmark functions for a Neo N3 contract.

§Example

#[neo_bench]
pub fn bench_my_contract(b: &mut Bencher) {
    b.iter(|| {
        let contract = MyContract::new();
        contract.get_name().unwrap()
    });
}