Adds a new program counter to this sample.
(&mut self, sample: usize)
| 145 | impl 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 { |
no outgoing calls