Skip to content

[WIP] Add cleanup method and support for merged metric files collection#2

Closed
Copilot wants to merge 2 commits intomultiproc-db-cleanupfrom
copilot/sub-pr-1
Closed

[WIP] Add cleanup method and support for merged metric files collection#2
Copilot wants to merge 2 commits intomultiproc-db-cleanupfrom
copilot/sub-pr-1

Conversation

Copy link

Copilot AI commented Mar 16, 2026

  • Fix collect(): Path.namestr(file) to pass full path to MmapedDict (fixes FileNotFoundError across all metric types)
  • Fix collect(): skip empty merged_metrics.pkl instead of crashing on pickle.loads(b"")
  • Fix cleanup(): use Path.touch(exist_ok=True) to create merged_metrics.pkl on first run instead of failing with FileNotFoundError on open("r+b")
  • Fix double-accumulation bug: removed _accumulate_metrics() call before pickling in cleanup() — raw samples are stored, accumulation happens only at collect() time (prevents histogram bucket counts from being doubled on each cleanup cycle)
  • Add 5 tests: stale file removal, incremental merging across two cleanups, locked file preservation, combined live+merged collection, histogram correctness across cleanup/collect cycle
  • Use Histogram.DEFAULT_BUCKETS + floatToGoString() in histogram test to avoid hardcoded bucket drift
  • Code review addressed; CodeQL clean

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: agoncharov-reef <73276794+agoncharov-reef@users.noreply.github.com>
Copilot AI requested a review from agoncharov-reef March 16, 2026 13:22
Copilot stopped work on behalf of agoncharov-reef due to an error March 16, 2026 13:22
@agoncharov-reef agoncharov-reef deleted the copilot/sub-pr-1 branch March 16, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants