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

Method add_samples

pulley/src/profile.rs:123–130  ·  view source on GitHub ↗

Adds a new set of samples to this recorded.

(&mut self, samples: &mut Samples)

Source from the content-addressed store, hash-verified

121
122 /// Adds a new set of samples to this recorded.
123 pub fn add_samples(&mut self, samples: &mut Samples) -> Result<()> {
124 self.file.write_all(&[ID_SAMPLES])?;
125
126 samples.finalize();
127 self.file.write_all(&samples.data)?;
128 samples.reset();
129 Ok(())
130 }
131
132 /// Flushes out all pending data to the filesystem.
133 pub fn flush(&mut self) -> Result<()> {

Callers 1

recording_threadFunction · 0.80

Calls 4

OkFunction · 0.85
write_allMethod · 0.80
finalizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected