Skip to content

Commit

Permalink
feat: add missing tracing spans for contract compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Oct 21, 2021
1 parent 4c98e20 commit f3db33e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions runtime/near-vm-runner/src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ pub mod wasmer0_cache {
code: &[u8],
config: &VMConfig,
) -> Result<wasmer_runtime::Module, CompilationError> {
let _span = tracing::debug_span!(target: "vm", "compile_module").entered();

let prepared_code =
prepare::prepare_contract(code, config).map_err(CompilationError::PrepareError)?;
wasmer_runtime::compile(&prepared_code).map_err(|err| match err {
Expand Down Expand Up @@ -249,6 +251,8 @@ pub mod wasmer2_cache {
config: &VMConfig,
store: &wasmer::Store,
) -> Result<wasmer::Module, CompilationError> {
let _span = tracing::debug_span!(target: "vm", "compile_module_wasmer2").entered();

let prepared_code =
prepare::prepare_contract(code, config).map_err(CompilationError::PrepareError)?;
wasmer::Module::new(&store, prepared_code).map_err(|err| match err {
Expand Down

0 comments on commit f3db33e

Please sign in to comment.