pub struct TraceIndex { /* private fields */ }Expand description
Locates every session’s rows in a set of Claude trace files without holding row content.
The export parses a session’s rows only when its merge reaches them, so peak memory follows
the sessions active at one time rather than the whole corpus. source_order numbers the
non-empty lines of all files in discovery order.
Implementations§
Source§impl TraceIndex
impl TraceIndex
Sourcepub fn build(trace_files: &[PathBuf], workers: usize) -> Result<Self>
pub fn build(trace_files: &[PathBuf], workers: usize) -> Result<Self>
Scans trace_files on up to workers threads.
pub fn is_empty(&self) -> bool
Sourcepub fn sessions(&self) -> impl Iterator<Item = (&str, Option<i64>)> + '_
pub fn sessions(&self) -> impl Iterator<Item = (&str, Option<i64>)> + '_
Sessions in order of first appearance, with a lower bound on their request start times.
Sourcepub fn load_session(&self, trace_id: &str) -> Result<Vec<TraceRecord>>
pub fn load_session(&self, trace_id: &str) -> Result<Vec<TraceRecord>>
Parses one session’s rows in source order.
Trait Implementations§
Source§impl Debug for TraceIndex
impl Debug for TraceIndex
Source§impl Default for TraceIndex
impl Default for TraceIndex
Source§impl SessionSource for TraceIndex
impl SessionSource for TraceIndex
Source§fn session_bounds(&self) -> Vec<(String, Option<i64>)>
fn session_bounds(&self) -> Vec<(String, Option<i64>)>
Every session, with a lower bound on when its requests can start when one is known.
Source§fn take_session(&mut self, trace_id: &str) -> Result<Vec<TraceRecord>>
fn take_session(&mut self, trace_id: &str) -> Result<Vec<TraceRecord>>
The session’s rows in source order.
Auto Trait Implementations§
impl Freeze for TraceIndex
impl RefUnwindSafe for TraceIndex
impl Send for TraceIndex
impl Sync for TraceIndex
impl Unpin for TraceIndex
impl UnsafeUnpin for TraceIndex
impl UnwindSafe for TraceIndex
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more