Struct linux_perf_data::PerfRecordIter
source · pub struct PerfRecordIter<R: Read> { /* private fields */ }Expand description
An iterator which incrementally reads and sorts the records from a perf.data file.
Implementations§
source§impl<R: Read> PerfRecordIter<R>
impl<R: Read> PerfRecordIter<R>
sourcepub fn next_record(
&mut self,
_perf_file: &mut PerfFile
) -> Result<Option<PerfFileRecord<'_>>, Error>
pub fn next_record(
&mut self,
_perf_file: &mut PerfFile
) -> Result<Option<PerfFileRecord<'_>>, Error>
Iterates the records in this file. The records are emitted in the correct order, i.e. sorted by time.
next_record does some internal buffering so that the sort order can
be guaranteed. This buffering takes advantage of FINISHED_ROUND
records so that we don’t buffer more records than necessary.