pub fn end_event()
Expand description

End an instrumentation event.

Must be matched with a call to begin_event within the same function

Examples found in repository?
examples/basic.rs (line 24)
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
fn big_fn() {
    // work 1

    superluminal_perf::begin_event("example-work1");
    let v = heavy_calc1();
    superluminal_perf::end_event();
    println!("work1 done: {}", v);

    // work 2

    superluminal_perf::begin_event("example-work2");
    let v = heavy_calc2();
    superluminal_perf::end_event();
    println!("work2 done: {}", v);
}