fix: filter out SESSION START / SESSION END marks in parse_structured_bin, and also add status feedback.
This commit is contained in:
@@ -344,6 +344,10 @@ def parse_structured_bin(bin_blob: bytes) -> list[MarkSplit]:
|
|||||||
s3_bytes += length
|
s3_bytes += length
|
||||||
elif rec_type == _REC_MARK:
|
elif rec_type == _REC_MARK:
|
||||||
label = payload.decode("utf-8", errors="replace")
|
label = payload.decode("utf-8", errors="replace")
|
||||||
|
# Skip auto-generated bridge lifecycle marks — only keep user marks
|
||||||
|
if label.startswith("SESSION START") or label.startswith("SESSION END"):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
marks.append(MarkSplit(label=label,
|
marks.append(MarkSplit(label=label,
|
||||||
bw_byte_offset=bw_bytes,
|
bw_byte_offset=bw_bytes,
|
||||||
s3_byte_offset=s3_bytes))
|
s3_byte_offset=s3_bytes))
|
||||||
|
|||||||
@@ -652,9 +652,12 @@ class AnalyzerPanel(tk.Frame):
|
|||||||
|
|
||||||
if marks:
|
if marks:
|
||||||
sessions = split_sessions_at_marks(bw_blob, s3_blob, marks)
|
sessions = split_sessions_at_marks(bw_blob, s3_blob, marks)
|
||||||
self.status_var.set(f"Parsing... ({len(marks)} mark(s) found)")
|
mark_labels = " | ".join(m.label for m in marks)
|
||||||
|
self.sb_var.set(f"{len(marks)} user mark(s): {mark_labels}")
|
||||||
self.update_idletasks()
|
self.update_idletasks()
|
||||||
else:
|
else:
|
||||||
|
if bin_path and bin_path.exists():
|
||||||
|
self.sb_var.set("No user marks found in session .bin — using standard session detection")
|
||||||
s3_frames = annotate_frames(parse_s3(s3_blob, trailer_len=0), "S3")
|
s3_frames = annotate_frames(parse_s3(s3_blob, trailer_len=0), "S3")
|
||||||
bw_frames = annotate_frames(parse_bw(bw_blob, trailer_len=0,
|
bw_frames = annotate_frames(parse_bw(bw_blob, trailer_len=0,
|
||||||
validate_checksum=True), "BW")
|
validate_checksum=True), "BW")
|
||||||
|
|||||||
Reference in New Issue
Block a user