MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / perfmap

Function perfmap

tests/all/profiling.rs:7–24  ·  view source on GitHub ↗

perfmap not supported on Windows

()

Source from the content-addressed store, hash-verified

5#[cfg_attr(miri, ignore)]
6#[cfg_attr(windows, ignore)] // perfmap not supported on Windows
7fn perfmap() -> Result<()> {
8 let mut config = Config::new();
9 config.profiler(wasmtime::ProfilingStrategy::PerfMap);
10 let engine = Engine::new(&config)?;
11
12 Module::new(&engine, "(module (func))")?;
13 Component::new(&engine, "(component)")?;
14 Component::new(&engine, "(component (core module (func)))")?;
15 Component::new(
16 &engine,
17 "(component
18 (core module (func))
19 (core module (func))
20 )",
21 )?;
22
23 Ok(())
24}

Callers

nothing calls this directly

Calls 3

OkFunction · 0.85
newFunction · 0.50
profilerMethod · 0.45

Tested by

no test coverage detected