@code-pushup/utils 0.107.0 → 0.108.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/utils",
3
- "version": "0.107.0",
3
+ "version": "0.108.0",
4
4
  "description": "Low-level utilities (helper functions, etc.) used by Code PushUp CLI",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/code-pushup/cli/tree/main/packages/utils#readme",
@@ -27,7 +27,7 @@
27
27
  "node": ">=18.2.0"
28
28
  },
29
29
  "dependencies": {
30
- "@code-pushup/models": "0.107.0",
30
+ "@code-pushup/models": "0.108.0",
31
31
  "ansis": "^3.3.0",
32
32
  "build-md": "^0.4.2",
33
33
  "bundle-require": "^5.1.0",
@@ -0,0 +1 @@
1
+ export declare const PROFILER_ENABLED_ENV_VAR = "CP_PROFILING";
@@ -0,0 +1,2 @@
1
+ export const PROFILER_ENABLED_ENV_VAR = 'CP_PROFILING';
2
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/lib/profiler/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,wBAAwB,GAAG,cAAc,CAAC"}
@@ -0,0 +1,134 @@
1
+ import { type ActionTrackConfigs, type MeasureCtxOptions, type MeasureOptions } from '../user-timing-extensibility-api-utils.js';
2
+ import type { ActionTrackEntryPayload, DevToolsColor, EntryMeta } from '../user-timing-extensibility-api.type.js';
3
+ /**
4
+ * Configuration options for creating a Profiler instance.
5
+ *
6
+ * @template T - Record type defining available track names and their configurations
7
+ */
8
+ type ProfilerMeasureOptions<T extends ActionTrackConfigs> = MeasureCtxOptions & {
9
+ /** Custom track configurations that will be merged with default settings */
10
+ tracks?: Record<keyof T, Partial<ActionTrackEntryPayload>>;
11
+ /** Whether profiling should be enabled (defaults to CP_PROFILING env var) */
12
+ enabled?: boolean;
13
+ };
14
+ /**
15
+ * Options for creating a performance marker.
16
+ */
17
+ export type MarkerOptions = EntryMeta & {
18
+ color?: DevToolsColor;
19
+ };
20
+ /**
21
+ * Options for configuring a Profiler instance.
22
+ *
23
+ * This is an alias for ProfilerMeasureOptions for backward compatibility.
24
+ *
25
+ * @template T - Record type defining available track names and their configurations
26
+ *
27
+ * @property enabled - Whether profiling is enabled (defaults to CP_PROFILING env var)
28
+ * @property prefix - Prefix for all measurement names
29
+ * @property track - Default track name for measurements
30
+ * @property trackGroup - Default track group for organization
31
+ * @property color - Default color for track entries
32
+ * @property tracks - Custom track configurations merged with defaults
33
+ */
34
+ export type ProfilerOptions<T extends ActionTrackConfigs = ActionTrackConfigs> = ProfilerMeasureOptions<T>;
35
+ /**
36
+ * Performance profiler that creates structured timing measurements with Chrome DevTools Extensibility API payloads.
37
+ *
38
+ * This class provides high-level APIs for performance monitoring focused on Chrome DevTools Extensibility API data.
39
+ * It supports both synchronous and asynchronous operations with all having smart defaults for custom track data.
40
+ *
41
+ */
42
+ export declare class Profiler<T extends ActionTrackConfigs> {
43
+ #private;
44
+ readonly tracks: Record<keyof T, ActionTrackEntryPayload> | undefined;
45
+ /**
46
+ * Creates a new Profiler instance with the specified configuration.
47
+ *
48
+ * @param options - Configuration options for the profiler
49
+ * @param options.tracks - Custom track configurations merged with defaults
50
+ * @param options.prefix - Prefix for all measurement names
51
+ * @param options.track - Default track name for measurements
52
+ * @param options.trackGroup - Default track group for organization
53
+ * @param options.color - Default color for track entries
54
+ * @param options.enabled - Whether profiling is enabled (defaults to CP_PROFILING env var)
55
+ *
56
+ */
57
+ constructor(options: ProfilerOptions<T>);
58
+ /**
59
+ * Sets enabled state for this profiler.
60
+ *
61
+ * Also sets the `CP_PROFILING` environment variable.
62
+ * This means any future {@link Profiler} instantiations (including child processes) will use the same enabled state.
63
+ *
64
+ * @param enabled - Whether profiling should be enabled
65
+ */
66
+ setEnabled(enabled: boolean): void;
67
+ /**
68
+ * Is profiling enabled?
69
+ *
70
+ * Profiling is enabled by {@link setEnabled} call or `CP_PROFILING` environment variable.
71
+ *
72
+ * @returns Whether profiling is currently enabled
73
+ */
74
+ isEnabled(): boolean;
75
+ /**
76
+ * Creates a performance mark including payload for a Chrome DevTools 'marker' item.
77
+ *
78
+ * Markers appear as vertical lines spanning all tracks and can include custom metadata
79
+ * for debugging and performance analysis. When profiling is disabled, this method
80
+ * returns immediately without creating any performance entries.
81
+ *
82
+ * @param name - Unique name for the marker
83
+ * @param opt - Metadata and styling for the marker
84
+ * @param opt.color - Color of the marker line (defaults to profiler default)
85
+ * @param opt.tooltipText - Text shown on hover
86
+ * @param opt.properties - Key-value pairs for detailed view show on click
87
+ *
88
+ * @example
89
+ * profiler.marker('user-action-start', {
90
+ * color: 'primary',
91
+ * tooltipText: 'User clicked save button',
92
+ * properties: [
93
+ * ['action', 'save'],
94
+ * ['elementId', 'save-btn']
95
+ * ]
96
+ * });
97
+ */
98
+ marker(name: string, opt?: MarkerOptions): void;
99
+ /**
100
+ * Measures the execution time of a synchronous operation.
101
+ *
102
+ * For asynchronous operations, use the {@link measureAsync} method.
103
+ *
104
+ * Creates performance start/end marks and a final measure.
105
+ * All entries have Chrome DevTools Extensibility API payload and are visualized under custom tracks.
106
+ * When profiling is disabled, executes the work function directly without overhead.
107
+ *
108
+ * @template R - The return type of the work function
109
+ * @param event - Name for this measurement event
110
+ * @param work - Function to execute and measure
111
+ * @param options - Measurement configuration overrides
112
+ * @returns The result of the work function
113
+ *
114
+ */
115
+ measure<R>(event: string, work: () => R, options?: MeasureOptions<R>): R;
116
+ /**
117
+ * Measures the execution time of an asynchronous operation.
118
+ *
119
+ * For synchronous operations, use the {@link measure} method.
120
+ *
121
+ * Creates performance start/end marks and a final measure.
122
+ * All entries have Chrome DevTools Extensibility API payload and are visualized under custom tracks.
123
+ * When profiling is disabled, executes and awaits the work function directly without overhead.
124
+ *
125
+ * @template R - The resolved type of the work promise
126
+ * @param event - Name for this measurement event
127
+ * @param work - Function returning a promise to execute and measure
128
+ * @param options - Measurement configuration overrides
129
+ * @returns Promise that resolves to the result of the work function
130
+ *
131
+ */
132
+ measureAsync<R>(event: string, work: () => Promise<R>, options?: MeasureOptions<R>): Promise<R>;
133
+ }
134
+ export {};
@@ -0,0 +1,163 @@
1
+ import process from 'node:process';
2
+ import { isEnvVarEnabled } from '../env.js';
3
+ import { asOptions, markerPayload, measureCtx, setupTracks, } from '../user-timing-extensibility-api-utils.js';
4
+ import { PROFILER_ENABLED_ENV_VAR } from './constants.js';
5
+ /**
6
+ * Performance profiler that creates structured timing measurements with Chrome DevTools Extensibility API payloads.
7
+ *
8
+ * This class provides high-level APIs for performance monitoring focused on Chrome DevTools Extensibility API data.
9
+ * It supports both synchronous and asynchronous operations with all having smart defaults for custom track data.
10
+ *
11
+ */
12
+ export class Profiler {
13
+ #enabled;
14
+ #defaults;
15
+ tracks;
16
+ #ctxOf;
17
+ /**
18
+ * Creates a new Profiler instance with the specified configuration.
19
+ *
20
+ * @param options - Configuration options for the profiler
21
+ * @param options.tracks - Custom track configurations merged with defaults
22
+ * @param options.prefix - Prefix for all measurement names
23
+ * @param options.track - Default track name for measurements
24
+ * @param options.trackGroup - Default track group for organization
25
+ * @param options.color - Default color for track entries
26
+ * @param options.enabled - Whether profiling is enabled (defaults to CP_PROFILING env var)
27
+ *
28
+ */
29
+ constructor(options) {
30
+ const { tracks, prefix, enabled, ...defaults } = options;
31
+ const dataType = 'track-entry';
32
+ this.#enabled = enabled ?? isEnvVarEnabled(PROFILER_ENABLED_ENV_VAR);
33
+ this.#defaults = { ...defaults, dataType };
34
+ this.tracks = tracks
35
+ ? setupTracks({ ...defaults, dataType }, tracks)
36
+ : undefined;
37
+ this.#ctxOf = measureCtx({
38
+ ...defaults,
39
+ dataType,
40
+ prefix,
41
+ });
42
+ }
43
+ /**
44
+ * Sets enabled state for this profiler.
45
+ *
46
+ * Also sets the `CP_PROFILING` environment variable.
47
+ * This means any future {@link Profiler} instantiations (including child processes) will use the same enabled state.
48
+ *
49
+ * @param enabled - Whether profiling should be enabled
50
+ */
51
+ setEnabled(enabled) {
52
+ process.env[PROFILER_ENABLED_ENV_VAR] = `${enabled}`;
53
+ this.#enabled = enabled;
54
+ }
55
+ /**
56
+ * Is profiling enabled?
57
+ *
58
+ * Profiling is enabled by {@link setEnabled} call or `CP_PROFILING` environment variable.
59
+ *
60
+ * @returns Whether profiling is currently enabled
61
+ */
62
+ isEnabled() {
63
+ return this.#enabled;
64
+ }
65
+ /**
66
+ * Creates a performance mark including payload for a Chrome DevTools 'marker' item.
67
+ *
68
+ * Markers appear as vertical lines spanning all tracks and can include custom metadata
69
+ * for debugging and performance analysis. When profiling is disabled, this method
70
+ * returns immediately without creating any performance entries.
71
+ *
72
+ * @param name - Unique name for the marker
73
+ * @param opt - Metadata and styling for the marker
74
+ * @param opt.color - Color of the marker line (defaults to profiler default)
75
+ * @param opt.tooltipText - Text shown on hover
76
+ * @param opt.properties - Key-value pairs for detailed view show on click
77
+ *
78
+ * @example
79
+ * profiler.marker('user-action-start', {
80
+ * color: 'primary',
81
+ * tooltipText: 'User clicked save button',
82
+ * properties: [
83
+ * ['action', 'save'],
84
+ * ['elementId', 'save-btn']
85
+ * ]
86
+ * });
87
+ */
88
+ marker(name, opt) {
89
+ if (!this.#enabled) {
90
+ return;
91
+ }
92
+ performance.mark(name, asOptions(markerPayload({
93
+ // marker only takes default color, no TrackMeta
94
+ ...(this.#defaults.color ? { color: this.#defaults.color } : {}),
95
+ ...opt,
96
+ })));
97
+ }
98
+ /**
99
+ * Measures the execution time of a synchronous operation.
100
+ *
101
+ * For asynchronous operations, use the {@link measureAsync} method.
102
+ *
103
+ * Creates performance start/end marks and a final measure.
104
+ * All entries have Chrome DevTools Extensibility API payload and are visualized under custom tracks.
105
+ * When profiling is disabled, executes the work function directly without overhead.
106
+ *
107
+ * @template R - The return type of the work function
108
+ * @param event - Name for this measurement event
109
+ * @param work - Function to execute and measure
110
+ * @param options - Measurement configuration overrides
111
+ * @returns The result of the work function
112
+ *
113
+ */
114
+ measure(event, work, options) {
115
+ if (!this.#enabled) {
116
+ return work();
117
+ }
118
+ const { start, success, error } = this.#ctxOf(event, options);
119
+ start();
120
+ try {
121
+ const r = work();
122
+ success(r);
123
+ return r;
124
+ }
125
+ catch (error_) {
126
+ error(error_);
127
+ throw error_;
128
+ }
129
+ }
130
+ /**
131
+ * Measures the execution time of an asynchronous operation.
132
+ *
133
+ * For synchronous operations, use the {@link measure} method.
134
+ *
135
+ * Creates performance start/end marks and a final measure.
136
+ * All entries have Chrome DevTools Extensibility API payload and are visualized under custom tracks.
137
+ * When profiling is disabled, executes and awaits the work function directly without overhead.
138
+ *
139
+ * @template R - The resolved type of the work promise
140
+ * @param event - Name for this measurement event
141
+ * @param work - Function returning a promise to execute and measure
142
+ * @param options - Measurement configuration overrides
143
+ * @returns Promise that resolves to the result of the work function
144
+ *
145
+ */
146
+ async measureAsync(event, work, options) {
147
+ if (!this.#enabled) {
148
+ return await work();
149
+ }
150
+ const { start, success, error } = this.#ctxOf(event, options);
151
+ start();
152
+ try {
153
+ const r = await work();
154
+ success(r);
155
+ return r;
156
+ }
157
+ catch (error_) {
158
+ error(error_);
159
+ throw error_;
160
+ }
161
+ }
162
+ }
163
+ //# sourceMappingURL=profiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiler.js","sourceRoot":"","sources":["../../../../src/lib/profiler/profiler.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAIL,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,GACZ,MAAM,2CAA2C,CAAC;AAMnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAqC1D;;;;;;GAMG;AACH,MAAM,OAAO,QAAQ;IACnB,QAAQ,CAAU;IACT,SAAS,CAA0B;IACnC,MAAM,CAAuD;IAC7D,MAAM,CAA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ult<P> & {
196
196
  properties?: DevToolsProperties;
197
197
  };
198
+ export type ActionTrackConfigs<T extends string = string> = Record<T, ActionTrackEntryPayload>;
198
199
  /**
199
200
  * Sets up tracks with default values merged into each track.
200
201
  * This helps to avoid repetition when defining multiple tracks with common properties.
@@ -209,19 +210,19 @@ export declare function setupTracks<const T extends Record<string, Partial<Actio
209
210
  * Options for customizing measurement behavior and callbacks.
210
211
  * Extends partial ActionTrackEntryPayload to allow overriding default track properties.
211
212
  */
212
- export type MeasureOptions = Partial<ActionTrackEntryPayload> & {
213
+ export type MeasureOptions<T = unknown> = Partial<ActionTrackEntryPayload> & {
213
214
  /**
214
215
  * Callback invoked when measurement completes successfully.
215
216
  * @param result - The successful result value
216
217
  * @returns Additional DevTools properties to merge for success state
217
218
  */
218
- success?: (result: unknown) => Partial<ActionTrackEntryPayload>;
219
+ success?: (result: T) => EntryMeta;
219
220
  /**
220
221
  * Callback invoked when measurement fails with an error.
221
222
  * @param error - The error that occurred
222
223
  * @returns Additional DevTools properties to merge for error state
223
224
  */
224
- error?: (error: unknown) => Partial<ActionTrackEntryPayload>;
225
+ error?: (error: unknown) => EntryMeta;
225
226
  };
226
227
  /**
227
228
  * Configuration for creating a measurement context.
@@ -311,9 +312,9 @@ export type MeasureCtxOptions = ActionTrackEntryPayload & {
311
312
  * - `success(result?)`: Completes successful measurement with optional result metadata
312
313
  * - `error(error)`: Completes failed measurement with error metadata
313
314
  */
314
- export declare function measureCtx(cfg: MeasureCtxOptions): (event: string, opt?: MeasureOptions) => {
315
+ export declare function measureCtx(cfg: MeasureCtxOptions): <T = unknown>(event: string, opt?: MeasureOptions<T>) => {
315
316
  start: () => import("perf_hooks").PerformanceMark;
316
- success: (r: unknown) => void;
317
+ success: (r: T) => void;
317
318
  error: (err: unknown) => void;
318
319
  };
319
320
  export {};
@@ -191,7 +191,7 @@ export function setupTracks(defaults, tracks) {
191
191
  * @returns The mark options without dataType, tooltipText and properties.
192
192
  */
193
193
  function toMarkMeasureOpts(devtools) {
194
- const { dataType: _, tooltipText: __, properties: ___, ...markDevtools } = devtools;
194
+ const { tooltipText: _, properties: __, ...markDevtools } = devtools;
195
195
  return { detail: { devtools: markDevtools } };
196
196
  }
197
197
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"user-timing-extensibility-api-utils.js","sourceRoot":"","sources":["../../../src/lib/user-timing-extensibility-api-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAapE,MAAM,kBAAkB,GAAG,aAAa,CAAC;AACzC,MAAM,cAAc,GAAG,QAAQ,CAAC;AAehC,MAAM,UAAU,4BAA4B,CAC1C,cAAkC,EAClC,kBAAuC;IAEvC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,cAAc,EAAE,GAAG,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,OAAyC;IACrE,OAAO;QACL,QAAQ,EAAE,cAAc;QACxB,GAAG,OAAO;KACa,CAAC;AAC5B,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAA4C;IAE5C,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IACnC,OAAO;QACL,QAAQ,EAAE,kBAAkB;QAC5B,KAAK;QACL,GAAG,IAAI;KACoB,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAmD;IAEnD,OAAO;QACL,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,OAAY;QACnB,GAAG,OAAO;KACa,CAAC;AAC5B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAEC;IAED,MAAM,EAAE,KA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WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;YAE3D,OAAO,EAAE,CAAC,CAAU,EAAE,EAAE;gBACtB,MAAM,cAAc,GAAG,oBAAoB,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBACxE,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC;gBACvD,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE;oBACrB,KAAK,EAAE,CAAC;oBACR,GAAG,EAAE,CAAC;oBACN,GAAG,SAAS,CAAC,cAAc,CAAC;iBAC7B,CAAC,CAAC;YACL,CAAC;YAED,KAAK,EAAE,CAAC,GAAY,EAAE,EAAE;gBACtB,MAAM,YAAY,GAAG,oBAAoB,CACvC,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAC7B,gBAAgB,CAAC,GAAG,CAAC,EACrB,SAAS,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,EACtB,KAAK,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CACnB,CAAC;gBACF,WAAW,CAAC,IAAI,CAAC,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAC;gBACrD,WAAW,CAAC,OAAO,CAAC,CAAC,EAAE;oBACrB,KAAK,EAAE,CAAC;oBACR,GAAG,EAAE,CAAC;oBACN,GAAG,SAAS,CAAC,YAAY,CAAC;iBAC3B,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"user-timing-extensibility-api-utils.js","sourceRoot":"","sources":["../../../src/lib/user-timing-extensibility-api-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AA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