Skip to content

feat(conflate): log memory on the sub-step done lines - #938

Merged
brawer merged 1 commit into
mainfrom
conflate-memory-log
Nov 11, 2026
Merged

brawer merged 1 commit into
mainfrom
conflate-memory-log

Conversation

@brawer

@brawer brawer commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Requested by Sascha · project thread

Fixes #932.

The conflate.match: progress sampler only runs during the first matching pass, so the log had no memory sample between the last progress line and conflate: end. That gap covers the time when the exclusive-match candidates and the local coverage counts are alive, which is probably the peak of conflate.

This adds a small info_with_memory! macro in conflate/mod.rs that logs the usual key-value pairs plus a memstats snapshot (rss_bytes, rss_peak_bytes, rss_anon_bytes, rss_file_bytes, rss_shmem_bytes, cgroup_*). It is used on:

  • conflate.coverage: done: the end of the first matching pass, with all exclusive-match candidates collected
  • conflate.deletion_candidates: done: while the local coverage counts are still alive
  • conflate.match: done
  • conflate.write: done
  • conflate.match: progress, which now uses the macro instead of its own copy of the fields

No change to the outputs.

Testing

  • cargo fmt --check, cargo clippy --all-targets -D warnings, and the unit tests pass.
  • The integration tests fail in my sandbox because tippecanoe is not installed; they fail the same way on unchanged main.

Generated by Claude Code

The conflate.match progress sampler stops after the first matching
pass, so the memory peak while the exclusive-match candidates and the
local coverage counts are alive never reached the log. Add the memstats
fields to conflate.coverage (end of the first pass), conflate.match,
conflate.deletion_candidates and conflate.write done lines.

Fixes #932

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ttfb2LjteYzSoHhNa6cFxw
@brawer brawer self-assigned this Nov 11, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Nov 11, 2026
@brawer
brawer merged commit 95d065d into main Nov 11, 2026
6 checks passed
@brawer
brawer deleted the conflate-memory-log branch November 11, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log memory after the first matching pass in conflate

2 participants