-
Notifications
You must be signed in to change notification settings - Fork 14
feat(utils): add WriteAheadLog classes #1210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
View your CI Pipeline Execution ↗ for commit 953a3e7
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/core
@code-pushup/create-cli
@code-pushup/models
@code-pushup/nx-plugin
@code-pushup/axe-plugin
@code-pushup/coverage-plugin
@code-pushup/eslint-plugin
@code-pushup/js-packages-plugin
@code-pushup/jsdocs-plugin
@code-pushup/lighthouse-plugin
@code-pushup/typescript-plugin
@code-pushup/utils
commit: |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 276ae6b with previous commit ea27cdc. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 3 groups improved, 👍 13 audits improved, 12 audits changed without impacting score🗃️ Groups
31 other groups are unchanged. 🛡️ Audits
654 other audits are unchanged. |
# Conflicts: # packages/utils/src/lib/sink-source.types.ts
# Conflicts: # testing/test-utils/src/lib/utils/perf-hooks.mock.ts
Code PushUp🥳 Code PushUp report has improved – compared current commit 276ae6b with previous commit ea27cdc. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🔴 46 | 🟡 51 | |
| Code coverage | 🟢 95 | 🟢 95 |
4 other categories are unchanged.
👍 2 groups improved, 👍 9 audits improved
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🔴 46 | 🟡 51 | |
| Code coverage | Code coverage metrics | 🟢 95 | 🟢 95 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Classes coverage | 🟨 3 undocumented classes | 🟨 3 undocumented classes | |
| JSDocs coverage | Properties coverage | 🟥 27 undocumented properties | 🟥 38 undocumented properties | |
| JSDocs coverage | Types coverage | 🟥 66 undocumented types | 🟨 56 undocumented types | |
| JSDocs coverage | Functions coverage | 🟥 241 undocumented functions | 🟥 244 undocumented functions | |
| JSDocs coverage | Methods coverage | 🟨 13 undocumented methods | 🟨 15 undocumented methods | |
| JSDocs coverage | Variables coverage | 🟥 49 undocumented variables | 🟥 57 undocumented variables | |
| Code coverage | Branch coverage | 🟩 91.7 % | 🟩 92.2 % | |
| Code coverage | Function coverage | 🟩 95.7 % | 🟩 96 % | |
| Code coverage | Line coverage | 🟩 97.7 % | 🟩 97.9 % |
435 other audits are unchanged.
13 other projects are unchanged.
hanna-skryl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The justification for sync file operations is well-reasoned 👍 I've added a few minor suggestions and comments.
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
Co-authored-by: Hanna Skryl <80118140+hanna-skryl@users.noreply.github.com>
# Conflicts: # packages/utils/src/lib/performance-observer.int.test.ts # packages/utils/src/lib/profiler/profiler.unit.test.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is ON, but it could not run because Privacy Mode (Legacy) is turned on. To enable Bugbot Autofix, switch your privacy mode in the Cursor dashboard.
Related: #1197
This PR includes:
wal.ts- general WriteAheadLog and sharded WAL inc format and filenameswal-trace-json.tstraceEvent specific login for a WALNote
This PR addresses a comment related to logging.
It could also be used as file output for the logger
Warning
All filesystem operations in WAL—and indirectly in the profiler—are synchronous by design.
The
eslintrules are disables over file name patternWhy synchronous
fsis used for WAL code?process.on('exit')cannot safely run async I/ONote
Introduces a synchronous Write-Ahead Log system and integrates it with profiler trace generation.
wal.ts:WriteAheadLogFile,ShardedWal, codecs (stringCodec,createTolerantCodec), sharding IDs/paths, finalize/cleanup helpers, andAppendableSinkinterfacegetProfilerId, new constants, and move/expand trace utils (trace-file-utils.ts) with encode/decode helpers, metadata, andentryToTraceEventswal-json-trace.ts: generate complete Chrome trace content and exposetraceEventWalFormatPerformanceObserverSinkto useAppendableSink.appendand update mocks/tests; remove legacysink-source.type.tsn/no-syncforwal*.tsfilesWritten by Cursor Bugbot for commit 953a3e7. This will update automatically on new commits. Configure here.