The ignoreTerm tool child was TERMed before Node installed its handler when the claim store sits on a fast disk. Candidate fixes the fixture; the patch itself is not committed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
18 lines
621 B
JavaScript
18 lines
621 B
JavaScript
import { openSync, writeSync, fsyncSync, closeSync, rmSync, mkdtempSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
for (const base of process.argv.slice(2)) {
|
|
const d = mkdtempSync(join(base, "dw-fsync-"));
|
|
const t = [];
|
|
for (let i = 0; i < 30; i++) {
|
|
const s = performance.now();
|
|
const fd = openSync(join(d, `f${i}`), "w");
|
|
writeSync(fd, "x".repeat(512));
|
|
fsyncSync(fd);
|
|
closeSync(fd);
|
|
t.push(performance.now() - s);
|
|
}
|
|
rmSync(d, { recursive: true });
|
|
t.sort((a, b) => a - b);
|
|
console.log(`${base}: write+fsync median ${t[15].toFixed(2)} ms, p90 ${t[27].toFixed(2)} ms`);
|
|
}
|