Skip to content

Add timed pipeline progress logging#16

Open
Toti330 wants to merge 5 commits into
mainfrom
feat/progress-logging
Open

Add timed pipeline progress logging#16
Toti330 wants to merge 5 commits into
mainfrom
feat/progress-logging

Conversation

@Toti330

@Toti330 Toti330 commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a time-based progress logger for long-running generation jobs. It reports immediately when generation begins, then reports every 30 seconds by default.

Why this is useful

A long seed-generation run should not be silent. The monitor provides exact generated/committed counts and percentages, interval and average rates, elapsed time, queue occupancy, aggregate worker and writer-pipeline time, likely bottleneck, Linux RSS/peak RSS, and process I/O. This gives a lightweight trace-like view without polling every generation pass.

Implementation

  • Adds PROGRESS_LOG=0 to disable the monitor and its timing hooks.
  • Adds PROGRESS_LOG_INTERVAL_SECS=N; default is 30.
  • Uses a dedicated sleeping monitor thread with a condition variable for prompt final output.
  • Wraps worker/writer thread lifetimes rather than timing individual seeds; there is no per-seed timer or instrumentation branch.
  • Labels writer timing as writer_pipeline because it includes connection, receive, COPY, and commit work.
  • Reads Linux process resource counters from /proc; unsupported systems show n/a.

Independence

This PR is based directly on main and is independently usable. It is compatible with the other feature branches but does not require them.

Verification

  • cargo test --all-targets: 3 progress tests passed.
  • A 1-second-cadence smoke run reported 36/60 (60.00%) at 1.002s, then emitted a final complete report.
  • A PROGRESS_LOG=0 smoke run emitted 0 progress lines.
  • Full integration merge with all feature branches passed 8 Rust and 4 Python tests.

Generated by GPT-5.6 Terra & Sol. Ideas from the author; implementation by AI.

@SuperB3333

Copy link
Copy Markdown
Owner

I'll make sense of this implement some consistency/readability changes and commit it

@SuperB3333

Copy link
Copy Markdown
Owner

Implemented 06b6fc3 as a skeleton.
Still need to insert actual values into the log

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