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

Method new

pulley/src/profile.rs:93–103  ·  view source on GitHub ↗

Creates a new recorder which will write to the specified filename.

(filename: &str)

Source from the content-addressed store, hash-verified

91impl Recorder {
92 /// Creates a new recorder which will write to the specified filename.
93 pub fn new(filename: &str) -> Result<Recorder> {
94 Ok(Recorder {
95 file: BufWriter::new(
96 OpenOptions::new()
97 .write(true)
98 .create_new(true)
99 .open(filename)
100 .with_context(|| format!("failed to open `{filename}` for writing"))?,
101 ),
102 })
103 }
104
105 /// Adds a new function that may be sampled in the future.
106 ///

Callers

nothing calls this directly

Calls 5

OkFunction · 0.85
with_contextMethod · 0.80
newFunction · 0.50
openMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected