Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bytecodealliance
GitHub Repository: bytecodealliance/wasmtime
Path: blob/main/tests/all/profiling.rs
3061 views
1
use wasmtime::component::Component;
2
use wasmtime::{Config, Engine, Module, Result};
3
4
#[test]
5
#[cfg_attr(miri, ignore)]
6
#[cfg_attr(windows, ignore)] // perfmap not supported on Windows
7
fn 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
}
25
26