stak_vm/
profiler.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::{Cons, Memory};

/// A profiler.
pub trait Profiler {
    /// Profiles a call.
    fn profile_call(&mut self, memory: &Memory, call_code: Cons, r#return: bool);

    /// Profiles a return.
    fn profile_return(&mut self, memory: &Memory);

    /// Profiles a call.
    fn profile_event(&mut self, name: &str);
}