fix(process): preserve monotonic capture timing and observed wall dates

This commit is contained in:
morluto
2026-10-13 15:12:08 +08:00
parent 7fc0b5ec9c
commit 9049dbaf0c
11 changed files with 224 additions and 91 deletions
@@ -1,4 +1,5 @@
import type { ProcessCaptureCleanupReport } from "../../domain/process/processCapture.js";
import { monotonicProcessCaptureClock } from "./ProcessCaptureClock.js";
/**
* Progress port accepted by process capture.
@@ -61,7 +62,7 @@ const formatProgressMessage = (
/** Serialize observed capture status through one rate-limited reporter. */
export const createProcessCaptureProgressTracker = (
progress: ProcessCaptureProgress | undefined,
now: () => number = Date.now,
now: () => number = monotonicProcessCaptureClock,
) => {
const started = now();
let completed = 0;