Suppress CLI output from worker threads#307
Conversation
- Skip direct WriteLn calls on TGocciaThreadPool workers - Suppress warnings and test assertion output in parallel runs - Mark worker threads with GIsWorkerThread
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughIntroduces a thread-local flag Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Suite Timing
Measured on ubuntu-latest x64. |
Benchmark Results364 benchmarks Interpreted: 🟢 29 improved · 🔴 265 regressed · 70 unchanged · avg -2.5% arraybuffer.js — Interp: 🟢 1, 🔴 10, 3 unch. · avg -5.1% · Bytecode: 🟢 13, 🔴 1 · avg +12.7%
arrays.js — Interp: 🔴 18, 1 unch. · avg -7.7% · Bytecode: 🟢 18, 1 unch. · avg +13.9%
async-await.js — Interp: 🔴 3, 3 unch. · avg -3.3% · Bytecode: 🟢 4, 2 unch. · avg +13.3%
base64.js — Interp: 🟢 1, 🔴 8, 1 unch. · avg -4.8% · Bytecode: 🟢 9, 1 unch. · avg +10.4%
classes.js — Interp: 🔴 18, 13 unch. · avg -4.1% · Bytecode: 🟢 13, 🔴 5, 13 unch. · avg +3.5%
closures.js — Interp: 🔴 10, 1 unch. · avg -8.4% · Bytecode: 🟢 11 · avg +12.1%
collections.js — Interp: 🔴 11, 1 unch. · avg -6.1% · Bytecode: 🟢 11, 1 unch. · avg +17.8%
destructuring.js — Interp: 🔴 21, 1 unch. · avg -5.5% · Bytecode: 🟢 21, 1 unch. · avg +14.5%
fibonacci.js — Interp: 🔴 8 · avg -7.2% · Bytecode: 🟢 8 · avg +13.4%
float16array.js — Interp: 🟢 5, 🔴 16, 11 unch. · avg -2.6% · Bytecode: 🟢 24, 🔴 6, 2 unch. · avg +8.2%
for-of.js — Interp: 🔴 7 · avg -5.1% · Bytecode: 🟢 7 · avg +13.9%
helpers/bench-module.js — Interp: 0 · Bytecode: 0
iterators.js — Interp: 🟢 1, 🔴 29, 12 unch. · avg -3.9% · Bytecode: 🟢 38, 4 unch. · avg +7.6%
json.js — Interp: 🔴 20 · avg -8.5% · Bytecode: 🟢 20 · avg +12.6%
jsx.jsx — Interp: 🔴 20, 1 unch. · avg -5.7% · Bytecode: 🟢 12, 🔴 1, 8 unch. · avg +2.8%
modules.js — Interp: 🔴 6, 3 unch. · avg -4.2% · Bytecode: 🟢 9 · avg +15.1%
numbers.js — Interp: 🔴 9, 2 unch. · avg -6.7% · Bytecode: 🟢 10, 1 unch. · avg +8.4%
objects.js — Interp: 🟢 2, 🔴 1, 4 unch. · avg +2.3% · Bytecode: 🟢 7 · avg +10.3%
promises.js — Interp: 🔴 9, 3 unch. · avg -4.5% · Bytecode: 🟢 10, 2 unch. · avg +9.8%
regexp.js — Interp: 🔴 9, 2 unch. · avg -8.3% · Bytecode: 🟢 8, 3 unch. · avg +4.1%
strings.js — Interp: 🔴 17, 2 unch. · avg -6.4% · Bytecode: 🟢 16, 🔴 1, 2 unch. · avg +17.7%
typed-arrays.js — Interp: 🟢 5, 🔴 13, 4 unch. · avg -2.6% · Bytecode: 🟢 14, 🔴 7, 1 unch. · avg +3.2%
uint8array-encoding.js — Interp: 🟢 14, 🔴 2, 2 unch. · avg +47.6% · Bytecode: 🟢 10, 🔴 2, 6 unch. · avg +21.1%
Measured on ubuntu-latest x64. Benchmark ranges compare cached main-branch min/max ops/sec with the PR run; overlapping ranges are treated as unchanged noise. Percentage deltas are secondary context. |
- Keep worker console silencing without touching TGocciaTestAssertions.SuppressOutput - Document the x86_64-darwin -O4 hang caused by the inlined property access
Summary
GIsWorkerThreadflag to identify work running insideTGocciaThreadPoolworkers.WriteLncalls inScriptLoader,TestRunner, andBenchmarkRunnerso worker threads no longer write directly to shared console output.Testing
ScriptLoader.dpr,TestRunner.dpr, andBenchmarkRunner.dpr.GIsWorkerThreadis set during worker initialization inunits/Goccia.Threading.pas.