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

Method append

pulley/src/profile.rs:147–150  ·  view source on GitHub ↗

Adds a new program counter to this sample.

(&mut self, sample: usize)

Source from the content-addressed store, hash-verified

145impl Samples {
146 /// Adds a new program counter to this sample.
147 pub fn append(&mut self, sample: usize) {
148 self.data.extend_from_slice(&(sample as u64).to_le_bytes());
149 self.samples += 1;
150 }
151
152 /// Returns the number of samples that have been collected.
153 pub fn num_samples(&self) -> u32 {

Callers 2

applyMethod · 0.45

Calls

no outgoing calls

Tested by 1