Function ic_cdk::api::performance_counter

source ยท
pub fn performance_counter(counter_type: u32) -> u64
Expand description

Gets the value of specified performance counter.

Supported counter types:

  • 0 : current execution instruction counter. The number of WebAssembly instructions the canister has executed since the beginning of the current Message execution.
  • 1 : call context instruction counter. The number of WebAssembly instructions the canister has executed within the call context of the current Message execution since Call context creation. The counter monotonically increases across all message executions in the call context until the corresponding call context is removed.