Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions processor/src/trace/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ impl<'a> TraceFragment<'a> {
}

/// Returns the number of rows in this execution trace fragment.
///
/// Returns `0` if the fragment has no columns (i.e., `data` is empty).
/// Otherwise, returns the length of the first column, which should be the same
/// as the length of all other columns.
pub fn len(&self) -> usize {
if self.data.is_empty() {
return 0;
}
self.data[0].len()
}

Expand Down