feat: add profiler class and measure API#1216
Conversation
|
View your CI Pipeline Execution ↗ for commit 17636b6
☁️ Nx Cloud last updated this comment at |
@code-pushup/ci
@code-pushup/cli
@code-pushup/create-cli
@code-pushup/core
@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 5559512 with previous commit cb4de31. 🕵️ See full comparison in Code PushUp portal 🔍 🏷️ Categories👍 3 groups improved, 👍 8 audits improved, 👎 3 audits regressed, 14 audits changed without impacting score🗃️ Groups
31 other groups are unchanged. 🛡️ Audits
654 other audits are unchanged. |
Code PushUp🤨 Code PushUp report has both improvements and regressions – compared current commit 5559512 with previous commit cb4de31. 💼 Project
|
| 🏷️ Category | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|
| Documentation | 🔴 42 | 🔴 45 | |
| Code coverage | 🟢 95 | 🟢 95 |
4 other categories are unchanged.
👍 1 group improved, 👎 1 group regressed, 👍 5 audits improved, 👎 2 audits regressed, 1 audit changed without impacting score
🗃️ Groups
| 🔌 Plugin | 🗃️ Group | ⭐ Previous score | ⭐ Current score | 🔄 Score change |
|---|---|---|---|---|
| JSDocs coverage | Documentation coverage | 🔴 42 | 🔴 45 | |
| Code coverage | Code coverage metrics | 🟢 95 | 🟢 95 |
13 other groups are unchanged.
🛡️ Audits
| 🔌 Plugin | 🛡️ Audit | 📏 Previous value | 📏 Current value | 🔄 Value change |
|---|---|---|---|---|
| JSDocs coverage | Methods coverage | 🟥 13 undocumented methods | 🟨 13 undocumented methods | |
| JSDocs coverage | Classes coverage | 🟥 3 undocumented classes | 🟨 3 undocumented classes | |
| JSDocs coverage | Types coverage | 🟥 65 undocumented types | 🟥 66 undocumented types | |
| JSDocs coverage | Variables coverage | 🟥 48 undocumented variables | 🟥 49 undocumented variables | |
| Code coverage | Branch coverage | 🟩 92.1 % | 🟩 91.8 % | |
| Code coverage | Line coverage | 🟩 97.7 % | 🟩 97.8 % | |
| Code coverage | Function coverage | 🟩 96.1 % | 🟩 96.2 % | |
| JSDocs coverage | Properties coverage | 🟥 23 undocumented properties | 🟥 27 undocumented properties |
436 other audits are unchanged.
13 other projects are unchanged.
matejchalk
left a comment
There was a problem hiding this comment.
A well-designed and documented API 👍
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
- Move generic type parameter <T> from measureCtx function to the returned function - Update MeasureOptions parameter to use MeasureOptions<T> for proper typing - Remove type casts in profiler measure and measureAsync methods - Fix measureAsync to properly await work function before calling success This change allows the type system to properly infer the result type T throughout the measurement chain without requiring type assertions.
- Add exported MarkerOptions type for marker method parameters - Replace inline type definition with named MarkerOptions type - Improves API documentation and type reusability
…type - Import ActionTrackConfigs from user-timing-extensibility-api-utils - Replace Record<string, ActionTrackEntryPayload> with ActionTrackConfigs in type constraints - Improves code consistency and reduces repetition
Related to #1197
This PR includes:
ProfilerclasssetEnabled,isEnabled,tracks,marker,measure,measureAsync