From eb8f66360f500918c69df67d4f5c4689e7a349bc Mon Sep 17 00:00:00 2001 From: Bran Date: Thu, 15 Oct 2026 18:39:16 -0700 Subject: [PATCH 1/5] Don't dump raw packet bytes into skipped_message_reason DiagParsingError formatted the full payload in both its Display string and its derived Debug, so every unparseable message wrote roughly 2KB of decimal bytes into the analysis ndjson. On a device emitting a log the parser rejects, that makes the analysis file larger than the capture it describes: on a Quectel EP06 it ran 13x larger and filled a 47MB filesystem in hours. Report the payload length instead. --- lib/src/analysis/analyzer.rs | 2 +- lib/src/diag/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/analysis/analyzer.rs b/lib/src/analysis/analyzer.rs index e6a7f23..3e3d332 100644 --- a/lib/src/analysis/analyzer.rs +++ b/lib/src/analysis/analyzer.rs @@ -495,7 +495,7 @@ impl Harness { let qmdl_message = match maybe_qmdl_message { Ok(msg) => msg, Err(err) => { - row.skipped_message_reason = Some(format!("{err:?}")); + row.skipped_message_reason = Some(format!("{err}")); return row; } }; diff --git a/lib/src/diag/mod.rs b/lib/src/diag/mod.rs index 6a1ca3b..578d8b5 100644 --- a/lib/src/diag/mod.rs +++ b/lib/src/diag/mod.rs @@ -59,9 +59,9 @@ pub enum DataType { #[derive(Debug, Clone, PartialEq, Error)] pub enum DiagParsingError { - #[error("Failed to parse Message: {0}, data: {1:?}")] + #[error("Failed to parse Message: {0} ({} bytes)", .1.len())] MessageParsingError(deku::DekuError, Vec), - #[error("HDLC decapsulation of message failed: {0}, data: {1:?}")] + #[error("HDLC decapsulation of message failed: {0} ({} bytes)", .1.len())] HdlcDecapsulationError(hdlc::HdlcError, Vec), } -- 2.47.3