pub struct CodeAnalysisRecord {Show 18 fields
pub total_unique_files: usize,
pub total_write_lines: usize,
pub total_read_lines: usize,
pub total_edit_lines: usize,
pub total_write_characters: usize,
pub total_read_characters: usize,
pub total_edit_characters: usize,
pub write_file_details: Vec<CodeAnalysisWriteDetail>,
pub read_file_details: Vec<CodeAnalysisReadDetail>,
pub edit_file_details: Vec<CodeAnalysisApplyDiffDetail>,
pub run_command_details: Vec<CodeAnalysisRunCommandDetail>,
pub tool_call_counts: CodeAnalysisToolCalls,
pub conversation_usage: FastHashMap<String, Value>,
pub advisor_usage: FastHashMap<String, Value>,
pub task_id: String,
pub timestamp: i64,
pub folder_path: String,
pub git_remote_url: String,
}Expand description
Aggregated metrics and per-operation details for a single coding session.
One record corresponds to one session file. When parsed in
ParseMode::UsageOnly the *_file_details / run_command_details vectors
are left empty to avoid allocating large bodies, while the total_*
counters and conversation_usage are still populated.
Fields§
§total_unique_files: usizeCount of distinct files touched (read, written, or edited) in the session.
total_write_lines: usizeSum of lines written across all write operations.
total_read_lines: usizeSum of lines read across all read operations.
total_edit_lines: usizeSum of replacement lines across all edit operations.
total_write_characters: usizeSum of characters written across all write operations.
total_read_characters: usizeSum of characters read across all read operations.
total_edit_characters: usizeSum of replacement characters across all edit operations.
write_file_details: Vec<CodeAnalysisWriteDetail>Per-operation write records (empty in ParseMode::UsageOnly).
read_file_details: Vec<CodeAnalysisReadDetail>Per-operation read records (empty in ParseMode::UsageOnly).
edit_file_details: Vec<CodeAnalysisApplyDiffDetail>Per-operation edit records (empty in ParseMode::UsageOnly).
run_command_details: Vec<CodeAnalysisRunCommandDetail>Per-command shell execution records (empty in ParseMode::UsageOnly).
tool_call_counts: CodeAnalysisToolCallsTool-call counters for the session.
conversation_usage: FastHashMap<String, Value>Token-usage payloads keyed by model name; shape varies by provider
(see crate::models::UsageResult).
advisor_usage: FastHashMap<String, Value>Token usage from Claude Code advisor_message iterations, keyed by the
advisor’s own model. Kept out of conversation_usage on purpose:
the analysis aggregator attributes a record’s file-operation / tool
counts to every model in conversation_usage, but an advisor model
never executes tools, so adding it there would mis-attribute the main
model’s metrics to the advisor. The usage path merges this in (priced
at the advisor’s own rate); analysis ignores it. Not serialized, so
the analysis JSON / golden output is unaffected.
task_id: StringSession / task identifier from the source log.
timestamp: i64Unix epoch timestamp (milliseconds) of the session’s last activity.
folder_path: StringWorking directory the session ran in.
git_remote_url: StringGit remote URL of the project, when one was detected.
Trait Implementations§
Source§impl Clone for CodeAnalysisRecord
impl Clone for CodeAnalysisRecord
Source§fn clone(&self) -> CodeAnalysisRecord
fn clone(&self) -> CodeAnalysisRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CodeAnalysisRecord
impl Debug for CodeAnalysisRecord
Source§impl<'de> Deserialize<'de> for CodeAnalysisRecord
impl<'de> Deserialize<'de> for CodeAnalysisRecord
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CodeAnalysisRecord
impl RefUnwindSafe for CodeAnalysisRecord
impl Send for CodeAnalysisRecord
impl Sync for CodeAnalysisRecord
impl Unpin for CodeAnalysisRecord
impl UnsafeUnpin for CodeAnalysisRecord
impl UnwindSafe for CodeAnalysisRecord
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
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>
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