pub trait DebugInfoExt: Sized {
// Required method
fn debug_events(&self) -> Box<dyn Iterator<Item = DebugItem<'_>> + '_>;
// Provided methods
fn print_debug(self, level: DebugOutputKind) -> Self { ... }
fn print_emitted_events(self) -> Self { ... }
fn host_calls(&self) -> Box<dyn Iterator<Item = HostCallInfo<'_>> + '_> { ... }
fn emitted_debug_prints(
&self
) -> Box<dyn Iterator<Item = (ContractAddress, &EmittedDebugStatement)> + '_> { ... }
fn host_calls_summary(
&self
) -> BTreeMap<ContractAddress, BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>> { ... }
fn host_calls_summary_per_entrypoint(
&self
) -> BTreeMap<(ContractAddress, EntrypointName<'_>), BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>> { ... }
}
Expand description
A trait implemented by types which can extract debug information from contract receive entrypoint executions.
Required Methods§
sourcefn debug_events(&self) -> Box<dyn Iterator<Item = DebugItem<'_>> + '_>
fn debug_events(&self) -> Box<dyn Iterator<Item = DebugItem<'_>> + '_>
Get an iterator over all the debug traces emitted by the execution.
Provided Methods§
sourcefn print_debug(self, level: DebugOutputKind) -> Self
fn print_debug(self, level: DebugOutputKind) -> Self
Print the desired level of debug information that was recorded. This function is meant to be used in a method-chaining style.
sourcefn print_emitted_events(self) -> Self
fn print_emitted_events(self) -> Self
Print (to stderr) all the events generated by concordium_dbg!
statements.
sourcefn host_calls(&self) -> Box<dyn Iterator<Item = HostCallInfo<'_>> + '_>
fn host_calls(&self) -> Box<dyn Iterator<Item = HostCallInfo<'_>> + '_>
Get an iterator over all host calls that have occurred, both in the remaining trace and in the rolled back part.
sourcefn emitted_debug_prints(
&self
) -> Box<dyn Iterator<Item = (ContractAddress, &EmittedDebugStatement)> + '_>
fn emitted_debug_prints( &self ) -> Box<dyn Iterator<Item = (ContractAddress, &EmittedDebugStatement)> + '_>
Get an iterator over all the emitted concordium_dbg!
events.
sourcefn host_calls_summary(
&self
) -> BTreeMap<ContractAddress, BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>>
fn host_calls_summary( &self ) -> BTreeMap<ContractAddress, BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>>
Get host function calls grouped by contract address that generated them. The value at each address and host function is the pair of the number of times the host function was called, and the total amount of interpreter energy that was used by all the calls.
sourcefn host_calls_summary_per_entrypoint(
&self
) -> BTreeMap<(ContractAddress, EntrypointName<'_>), BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>>
fn host_calls_summary_per_entrypoint( &self ) -> BTreeMap<(ContractAddress, EntrypointName<'_>), BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>>
Get host function calls grouped by contract address and entrypoint that generated them. The value at each address and host function is the pair of the number of times the host function was called, and the total amount of interpreter energy that was used by all the calls.