stak_vm/
profiler.rs

1use crate::{Cons, Error, Memory};
2
3/// A profiler.
4pub trait Profiler<H> {
5    /// Profiles a call.
6    fn profile_call(
7        &mut self,
8        memory: &Memory<H>,
9        call_code: Cons,
10        r#return: bool,
11    ) -> Result<(), Error>;
12
13    /// Profiles a return.
14    fn profile_return(&mut self, memory: &Memory<H>) -> Result<(), Error>;
15
16    /// Profiles a call.
17    fn profile_event(&mut self, name: &str) -> Result<(), Error>;
18}