testplane 9.1.1 → 9.2.1
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/build/package.json +2 -2
- package/build/src/base-testplane.d.ts +17 -1
- package/build/src/base-testplane.js +43 -9
- package/build/src/base-testplane.js.map +1 -1
- package/build/src/browser/browser.d.ts +3 -0
- package/build/src/browser/browser.js +4 -2
- package/build/src/browser/browser.js.map +1 -1
- package/build/src/browser/cdp/selectivity/testplane-selectivity.js +19 -19
- package/build/src/browser/cdp/selectivity/testplane-selectivity.js.map +1 -1
- package/build/src/browser/client-scripts/screen-shooter/build/bundle.compat.js +2 -2
- package/build/src/browser/client-scripts/screen-shooter/build/bundle.native.js +2 -2
- package/build/src/browser/client-scripts/screen-shooter/tsc-out/client-scripts/screen-shooter/implementation.js +52 -84
- package/build/src/browser/client-scripts/screen-shooter/tsc-out/client-scripts/screen-shooter/operations.js +4 -1
- package/build/src/browser/commands/assert-view/index.js +25 -2
- package/build/src/browser/commands/assert-view/index.js.map +1 -1
- package/build/src/browser/existing-browser.js +8 -1
- package/build/src/browser/existing-browser.js.map +1 -1
- package/build/src/browser/history/index.d.ts +4 -2
- package/build/src/browser/history/index.js +146 -67
- package/build/src/browser/history/index.js.map +1 -1
- package/build/src/browser/new-browser.js +1 -1
- package/build/src/browser/new-browser.js.map +1 -1
- package/build/src/browser/screen-shooter/elements-screen-shooter.d.ts +5 -0
- package/build/src/browser/screen-shooter/elements-screen-shooter.js +102 -55
- package/build/src/browser/screen-shooter/elements-screen-shooter.js.map +1 -1
- package/build/src/browser/screen-shooter/viewport-screen-shooter.d.ts +4 -0
- package/build/src/browser/screen-shooter/viewport-screen-shooter.js +29 -7
- package/build/src/browser/screen-shooter/viewport-screen-shooter.js.map +1 -1
- package/build/src/browser-pool/basic-pool.d.ts +4 -3
- package/build/src/browser-pool/basic-pool.js +39 -7
- package/build/src/browser-pool/basic-pool.js.map +1 -1
- package/build/src/browser-pool/caching-pool.d.ts +3 -2
- package/build/src/browser-pool/caching-pool.js +19 -7
- package/build/src/browser-pool/caching-pool.js.map +1 -1
- package/build/src/browser-pool/index.d.ts +2 -1
- package/build/src/browser-pool/index.js +8 -4
- package/build/src/browser-pool/index.js.map +1 -1
- package/build/src/browser-pool/limited-pool.d.ts +5 -1
- package/build/src/browser-pool/limited-pool.js +42 -4
- package/build/src/browser-pool/limited-pool.js.map +1 -1
- package/build/src/browser-pool/per-browser-limited-pool.d.ts +2 -2
- package/build/src/browser-pool/per-browser-limited-pool.js +2 -1
- package/build/src/browser-pool/per-browser-limited-pool.js.map +1 -1
- package/build/src/browser-pool/types.d.ts +8 -0
- package/build/src/cli/commands/config/index.js +7 -3
- package/build/src/cli/commands/config/index.js.map +1 -1
- package/build/src/cli/commands/install-deps/index.js +46 -38
- package/build/src/cli/commands/install-deps/index.js.map +1 -1
- package/build/src/cli/commands/list-browsers/index.js +15 -11
- package/build/src/cli/commands/list-browsers/index.js.map +1 -1
- package/build/src/cli/commands/list-tests/index.js +25 -21
- package/build/src/cli/commands/list-tests/index.js.map +1 -1
- package/build/src/cli/commands/selectivity-merge-dumps/index.js +12 -5
- package/build/src/cli/commands/selectivity-merge-dumps/index.js.map +1 -1
- package/build/src/cli/index.js +10 -6
- package/build/src/cli/index.js.map +1 -1
- package/build/src/config/defaults.d.ts +5 -0
- package/build/src/config/defaults.js +4 -0
- package/build/src/config/defaults.js.map +1 -1
- package/build/src/config/index.d.ts +6 -4
- package/build/src/config/index.js +60 -19
- package/build/src/config/index.js.map +1 -1
- package/build/src/config/options.js +26 -0
- package/build/src/config/options.js.map +1 -1
- package/build/src/config/types.d.ts +19 -0
- package/build/src/constants/process-messages.d.ts +3 -0
- package/build/src/constants/process-messages.js +4 -1
- package/build/src/constants/process-messages.js.map +1 -1
- package/build/src/events/async-emitter/index.d.ts +38 -0
- package/build/src/events/async-emitter/index.js +248 -5
- package/build/src/events/async-emitter/index.js.map +1 -1
- package/build/src/events/index.d.ts +3 -0
- package/build/src/events/index.js +1 -0
- package/build/src/events/index.js.map +1 -1
- package/build/src/index.d.ts +2 -1
- package/build/src/profiler/analysis/aggregator.d.ts +19 -0
- package/build/src/profiler/analysis/aggregator.js +229 -0
- package/build/src/profiler/analysis/aggregator.js.map +1 -0
- package/build/src/profiler/analysis/analyzers.d.ts +10 -0
- package/build/src/profiler/analysis/analyzers.js +1228 -0
- package/build/src/profiler/analysis/analyzers.js.map +1 -0
- package/build/src/profiler/analysis/compact.d.ts +5 -0
- package/build/src/profiler/analysis/compact.js +46 -0
- package/build/src/profiler/analysis/compact.js.map +1 -0
- package/build/src/profiler/analysis/finding-order.d.ts +4 -0
- package/build/src/profiler/analysis/finding-order.js +28 -0
- package/build/src/profiler/analysis/finding-order.js.map +1 -0
- package/build/src/profiler/analysis/outliers.d.ts +6 -0
- package/build/src/profiler/analysis/outliers.js +49 -0
- package/build/src/profiler/analysis/outliers.js.map +1 -0
- package/build/src/profiler/analysis/policy-v1.d.ts +71 -0
- package/build/src/profiler/analysis/policy-v1.js +43 -0
- package/build/src/profiler/analysis/policy-v1.js.map +1 -0
- package/build/src/profiler/collectors/module-graph.d.ts +14 -0
- package/build/src/profiler/collectors/module-graph.js +99 -0
- package/build/src/profiler/collectors/module-graph.js.map +1 -0
- package/build/src/profiler/collectors/pool-observer.d.ts +9 -0
- package/build/src/profiler/collectors/pool-observer.js +40 -0
- package/build/src/profiler/collectors/pool-observer.js.map +1 -0
- package/build/src/profiler/manager.d.ts +55 -0
- package/build/src/profiler/manager.js +343 -0
- package/build/src/profiler/manager.js.map +1 -0
- package/build/src/profiler/output/console.d.ts +6 -0
- package/build/src/profiler/output/console.js +443 -0
- package/build/src/profiler/output/console.js.map +1 -0
- package/build/src/profiler/output/json.d.ts +2 -0
- package/build/src/profiler/output/json.js +24 -0
- package/build/src/profiler/output/json.js.map +1 -0
- package/build/src/profiler/retention/operation-store.d.ts +22 -0
- package/build/src/profiler/retention/operation-store.js +110 -0
- package/build/src/profiler/retention/operation-store.js.map +1 -0
- package/build/src/profiler/retention/policy-v1.d.ts +22 -0
- package/build/src/profiler/retention/policy-v1.js +49 -0
- package/build/src/profiler/retention/policy-v1.js.map +1 -0
- package/build/src/profiler/retention/result-budget.d.ts +2 -0
- package/build/src/profiler/retention/result-budget.js +117 -0
- package/build/src/profiler/retention/result-budget.js.map +1 -0
- package/build/src/profiler/retention/serialized-budget.d.ts +5 -0
- package/build/src/profiler/retention/serialized-budget.js +58 -0
- package/build/src/profiler/retention/serialized-budget.js.map +1 -0
- package/build/src/profiler/retention/streaming-statistics.d.ts +38 -0
- package/build/src/profiler/retention/streaming-statistics.js +191 -0
- package/build/src/profiler/retention/streaming-statistics.js.map +1 -0
- package/build/src/profiler/retention/top-k.d.ts +13 -0
- package/build/src/profiler/retention/top-k.js +57 -0
- package/build/src/profiler/retention/top-k.js.map +1 -0
- package/build/src/profiler/runtime/async-activity.d.ts +19 -0
- package/build/src/profiler/runtime/async-activity.js +113 -0
- package/build/src/profiler/runtime/async-activity.js.map +1 -0
- package/build/src/profiler/runtime/bootstrap-probe.d.ts +42 -0
- package/build/src/profiler/runtime/bootstrap-probe.js +91 -0
- package/build/src/profiler/runtime/bootstrap-probe.js.map +1 -0
- package/build/src/profiler/runtime/clock.d.ts +17 -0
- package/build/src/profiler/runtime/clock.js +15 -0
- package/build/src/profiler/runtime/clock.js.map +1 -0
- package/build/src/profiler/runtime/event-observer.d.ts +4 -0
- package/build/src/profiler/runtime/event-observer.js +142 -0
- package/build/src/profiler/runtime/event-observer.js.map +1 -0
- package/build/src/profiler/runtime/noop.d.ts +20 -0
- package/build/src/profiler/runtime/noop.js +37 -0
- package/build/src/profiler/runtime/noop.js.map +1 -0
- package/build/src/profiler/runtime/runtime.d.ts +95 -0
- package/build/src/profiler/runtime/runtime.js +1343 -0
- package/build/src/profiler/runtime/runtime.js.map +1 -0
- package/build/src/profiler/runtime/types.d.ts +88 -0
- package/build/src/profiler/runtime/types.js +3 -0
- package/build/src/profiler/runtime/types.js.map +1 -0
- package/build/src/profiler/sanitize.d.ts +15 -0
- package/build/src/profiler/sanitize.js +194 -0
- package/build/src/profiler/sanitize.js.map +1 -0
- package/build/src/profiler/schema/index.d.ts +1 -0
- package/build/src/profiler/schema/index.js +18 -0
- package/build/src/profiler/schema/index.js.map +1 -0
- package/build/src/profiler/schema/v1.d.ts +281 -0
- package/build/src/profiler/schema/v1.js +3 -0
- package/build/src/profiler/schema/v1.js.map +1 -0
- package/build/src/runner/browser-env/vite/browser-modules/mocha/index.js +30 -0
- package/build/src/runner/browser-env/vite/browser-modules/mocha/index.js.map +1 -1
- package/build/src/runner/browser-env/vite/browser-modules/tsconfig.tsbuildinfo +1 -1
- package/build/src/runner/browser-env/vite/browser-modules/types.d.ts +31 -6
- package/build/src/runner/browser-env/vite/browser-modules/types.js +8 -8
- package/build/src/runner/browser-env/vite/browser-modules/types.js.map +1 -1
- package/build/src/runner/browser-env/vite/plugins/generate-index-html.d.ts +7 -1
- package/build/src/runner/browser-env/vite/plugins/generate-index-html.js +28 -6
- package/build/src/runner/browser-env/vite/plugins/generate-index-html.js.map +1 -1
- package/build/src/runner/browser-env/vite/server.js +17 -1
- package/build/src/runner/browser-env/vite/server.js.map +1 -1
- package/build/src/runner/browser-env/vite/socket.js +4 -0
- package/build/src/runner/browser-env/vite/socket.js.map +1 -1
- package/build/src/runner/browser-env/vite/types.d.ts +9 -7
- package/build/src/runner/browser-env/vite/types.js +8 -8
- package/build/src/runner/browser-env/vite/types.js.map +1 -1
- package/build/src/runner/browser-env/vite/utils.js +9 -2
- package/build/src/runner/browser-env/vite/utils.js.map +1 -1
- package/build/src/runner/browser-runner.d.ts +3 -1
- package/build/src/runner/browser-runner.js +4 -2
- package/build/src/runner/browser-runner.js.map +1 -1
- package/build/src/runner/index.d.ts +3 -1
- package/build/src/runner/index.js +7 -4
- package/build/src/runner/index.js.map +1 -1
- package/build/src/runner/test-runner/index.d.ts +2 -1
- package/build/src/runner/test-runner/index.js +2 -2
- package/build/src/runner/test-runner/index.js.map +1 -1
- package/build/src/runner/test-runner/insistant-test-runner.d.ts +2 -1
- package/build/src/runner/test-runner/insistant-test-runner.js +3 -2
- package/build/src/runner/test-runner/insistant-test-runner.js.map +1 -1
- package/build/src/runner/test-runner/regular-test-runner.d.ts +9 -3
- package/build/src/runner/test-runner/regular-test-runner.js +77 -16
- package/build/src/runner/test-runner/regular-test-runner.js.map +1 -1
- package/build/src/signal-handler.js +14 -5
- package/build/src/signal-handler.js.map +1 -1
- package/build/src/test-reader/index.d.ts +2 -1
- package/build/src/test-reader/index.js +19 -10
- package/build/src/test-reader/index.js.map +1 -1
- package/build/src/test-reader/mocha-reader/index.d.ts +2 -1
- package/build/src/test-reader/mocha-reader/index.js +41 -24
- package/build/src/test-reader/mocha-reader/index.js.map +1 -1
- package/build/src/test-reader/mocha-reader/tree-builder-decorator.js +2 -2
- package/build/src/test-reader/mocha-reader/tree-builder-decorator.js.map +1 -1
- package/build/src/test-reader/mocha-reader/utils.d.ts +2 -0
- package/build/src/test-reader/mocha-reader/utils.js +18 -2
- package/build/src/test-reader/mocha-reader/utils.js.map +1 -1
- package/build/src/test-reader/test-object/hook.d.ts +4 -2
- package/build/src/test-reader/test-object/hook.js +3 -1
- package/build/src/test-reader/test-object/hook.js.map +1 -1
- package/build/src/test-reader/test-parser.d.ts +2 -1
- package/build/src/test-reader/test-parser.js +48 -4
- package/build/src/test-reader/test-parser.js.map +1 -1
- package/build/src/testplane.d.ts +6 -2
- package/build/src/testplane.js +82 -27
- package/build/src/testplane.js.map +1 -1
- package/build/src/types/index.d.ts +4 -1
- package/build/src/types/index.js.map +1 -1
- package/build/src/utils/exit-code.d.ts +1 -0
- package/build/src/utils/exit-code.js +28 -0
- package/build/src/utils/exit-code.js.map +1 -0
- package/build/src/utils/module-observer-registry.d.ts +43 -0
- package/build/src/utils/module-observer-registry.js +257 -0
- package/build/src/utils/module-observer-registry.js.map +1 -0
- package/build/src/utils/processor.js +1 -0
- package/build/src/utils/processor.js.map +1 -1
- package/build/src/utils/workers-registry.d.ts +48 -1
- package/build/src/utils/workers-registry.js +162 -4
- package/build/src/utils/workers-registry.js.map +1 -1
- package/build/src/worker/browser-env/runner/test-runner/execution-thread.js +15 -1
- package/build/src/worker/browser-env/runner/test-runner/execution-thread.js.map +1 -1
- package/build/src/worker/browser-env/runner/test-runner/index.js +20 -0
- package/build/src/worker/browser-env/runner/test-runner/index.js.map +1 -1
- package/build/src/worker/index.js +39 -1
- package/build/src/worker/index.js.map +1 -1
- package/build/src/worker/runner/browser-pool.d.ts +3 -2
- package/build/src/worker/runner/browser-pool.js +5 -3
- package/build/src/worker/runner/browser-pool.js.map +1 -1
- package/build/src/worker/runner/caching-test-parser.d.ts +6 -1
- package/build/src/worker/runner/caching-test-parser.js +40 -4
- package/build/src/worker/runner/caching-test-parser.js.map +1 -1
- package/build/src/worker/runner/index.d.ts +10 -9
- package/build/src/worker/runner/index.js +52 -6
- package/build/src/worker/runner/index.js.map +1 -1
- package/build/src/worker/runner/sequence-test-parser.d.ts +4 -1
- package/build/src/worker/runner/sequence-test-parser.js +17 -3
- package/build/src/worker/runner/sequence-test-parser.js.map +1 -1
- package/build/src/worker/runner/simple-test-parser.d.ts +3 -1
- package/build/src/worker/runner/simple-test-parser.js +4 -2
- package/build/src/worker/runner/simple-test-parser.js.map +1 -1
- package/build/src/worker/runner/test-runner/execution-thread.d.ts +20 -2
- package/build/src/worker/runner/test-runner/execution-thread.js +37 -2
- package/build/src/worker/runner/test-runner/execution-thread.js.map +1 -1
- package/build/src/worker/runner/test-runner/hook-runner.d.ts +1 -1
- package/build/src/worker/runner/test-runner/hook-runner.js +4 -4
- package/build/src/worker/runner/test-runner/hook-runner.js.map +1 -1
- package/build/src/worker/runner/test-runner/index.d.ts +8 -7
- package/build/src/worker/runner/test-runner/index.js +36 -25
- package/build/src/worker/runner/test-runner/index.js.map +1 -1
- package/build/src/worker/runner/test-runner/types.d.ts +8 -1
- package/build/src/worker/testplane-facade.js +63 -4
- package/build/src/worker/testplane-facade.js.map +1 -1
- package/build/src/worker/testplane.d.ts +6 -0
- package/build/src/worker/testplane.js +7 -1
- package/build/src/worker/testplane.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { Config } from "../config";
|
|
2
|
+
import { type ProfilerConsole } from "./output/console";
|
|
3
|
+
import { BootstrapProbe } from "./runtime/bootstrap-probe";
|
|
4
|
+
import type { ProfilerRuntimeLike } from "./runtime/types";
|
|
5
|
+
import type { ProfilerOperationName, ProfilerPartialReason, ProfilerResultV1, ProcessRef } from "./schema";
|
|
6
|
+
interface ProfilerResultEmitter {
|
|
7
|
+
(result: Readonly<ProfilerResultV1>): Promise<unknown> | unknown;
|
|
8
|
+
}
|
|
9
|
+
interface ProfilerManagerOptions {
|
|
10
|
+
output?: ProfilerConsole;
|
|
11
|
+
process?: ProcessRef;
|
|
12
|
+
runId?: string;
|
|
13
|
+
/** Amount added to local wall-clock timestamps to align them with the main process. */
|
|
14
|
+
clockOffsetMs?: number;
|
|
15
|
+
/** Estimated maximum error of the supplied clock alignment. */
|
|
16
|
+
clockUncertaintyMs?: number;
|
|
17
|
+
}
|
|
18
|
+
export declare class ProfilerManager {
|
|
19
|
+
private readonly _config;
|
|
20
|
+
private readonly _projectRoot;
|
|
21
|
+
private _sanitizer?;
|
|
22
|
+
private readonly _console?;
|
|
23
|
+
private _probe?;
|
|
24
|
+
private _runtime?;
|
|
25
|
+
private _active?;
|
|
26
|
+
private _emitResult?;
|
|
27
|
+
private _lastResult?;
|
|
28
|
+
/** In-flight finalize; concurrent callers (SIGINT + profileOperation finally) share one result. */
|
|
29
|
+
private _finalizePromise?;
|
|
30
|
+
private readonly _process;
|
|
31
|
+
private readonly _initialRunId?;
|
|
32
|
+
private readonly _clockOffsetMs;
|
|
33
|
+
private readonly _clockUncertaintyMs?;
|
|
34
|
+
constructor(config: Config, probe: BootstrapProbe, options?: ProfilerManagerOptions);
|
|
35
|
+
get runtime(): ProfilerRuntimeLike;
|
|
36
|
+
get lastResult(): Readonly<ProfilerResultV1> | undefined;
|
|
37
|
+
isEnabled(): boolean;
|
|
38
|
+
setResultEmitter(emitter: ProfilerResultEmitter): void;
|
|
39
|
+
profileOperation<T>(name: ProfilerOperationName, action: () => T | Promise<T>): Promise<T>;
|
|
40
|
+
finalizeSetupError(error: unknown): Promise<void>;
|
|
41
|
+
addPartialReason(reason: ProfilerPartialReason): void;
|
|
42
|
+
abort(reason: ProfilerPartialReason): void;
|
|
43
|
+
sanitizeMessage(message: string): string;
|
|
44
|
+
finalize(): Promise<Readonly<ProfilerResultV1> | undefined>;
|
|
45
|
+
finalizeSafely(): Promise<void>;
|
|
46
|
+
private _finalizeOnce;
|
|
47
|
+
private _buildResult;
|
|
48
|
+
private _deliverResult;
|
|
49
|
+
private _ensureRuntime;
|
|
50
|
+
private _getSanitizer;
|
|
51
|
+
private _createRuntime;
|
|
52
|
+
private _activateOperation;
|
|
53
|
+
private _warnDelivery;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ProfilerManager = void 0;
|
|
30
|
+
const node_os_1 = __importDefault(require("node:os"));
|
|
31
|
+
const node_perf_hooks_1 = require("node:perf_hooks");
|
|
32
|
+
const node_crypto_1 = require("node:crypto");
|
|
33
|
+
const NodeModule = __importStar(require("node:module"));
|
|
34
|
+
const aggregator_1 = require("./analysis/aggregator");
|
|
35
|
+
const analyzers_1 = require("./analysis/analyzers");
|
|
36
|
+
const compact_1 = require("./analysis/compact");
|
|
37
|
+
const console_1 = require("./output/console");
|
|
38
|
+
const json_1 = require("./output/json");
|
|
39
|
+
const noop_1 = require("./runtime/noop");
|
|
40
|
+
const runtime_1 = require("./runtime/runtime");
|
|
41
|
+
const sanitize_1 = require("./sanitize");
|
|
42
|
+
const result_budget_1 = require("./retention/result-budget");
|
|
43
|
+
const serialized_budget_1 = require("./retention/serialized-budget");
|
|
44
|
+
class ProfilerManager {
|
|
45
|
+
constructor(config, probe, options = {}) {
|
|
46
|
+
this._config = config;
|
|
47
|
+
this._projectRoot = process.cwd();
|
|
48
|
+
this._probe = probe;
|
|
49
|
+
this._console = options.output;
|
|
50
|
+
this._process = options.process ?? { type: "master", pid: process.pid };
|
|
51
|
+
this._initialRunId = options.runId;
|
|
52
|
+
this._clockOffsetMs = options.clockOffsetMs ?? 0;
|
|
53
|
+
this._clockUncertaintyMs = options.clockUncertaintyMs;
|
|
54
|
+
if (this.isEnabled()) {
|
|
55
|
+
this._createRuntime();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
probe.discard();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
get runtime() {
|
|
62
|
+
return this._runtime ?? noop_1.noopProfilerRuntime;
|
|
63
|
+
}
|
|
64
|
+
get lastResult() {
|
|
65
|
+
return this._lastResult;
|
|
66
|
+
}
|
|
67
|
+
isEnabled() {
|
|
68
|
+
return (this._config.profiler?.level ?? 0) > 0;
|
|
69
|
+
}
|
|
70
|
+
setResultEmitter(emitter) {
|
|
71
|
+
this._emitResult = emitter;
|
|
72
|
+
}
|
|
73
|
+
async profileOperation(name, action) {
|
|
74
|
+
if (!this.isEnabled()) {
|
|
75
|
+
return action();
|
|
76
|
+
}
|
|
77
|
+
if (this._active) {
|
|
78
|
+
return action();
|
|
79
|
+
}
|
|
80
|
+
const active = this._activateOperation(name, "unknown");
|
|
81
|
+
try {
|
|
82
|
+
const result = await action();
|
|
83
|
+
if (active.outcome !== "aborted") {
|
|
84
|
+
active.outcome = typeof result === "boolean" && !result ? "failed" : "passed";
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
active.outcome = "aborted";
|
|
90
|
+
active.partialReasons.push({
|
|
91
|
+
code: "OPERATION_ERROR",
|
|
92
|
+
message: this._getSanitizer().string(String(error?.message ?? error)),
|
|
93
|
+
});
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
await this.finalizeSafely();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
async finalizeSetupError(error) {
|
|
101
|
+
if (!this.isEnabled()) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this._activateOperation("api", "aborted", [
|
|
105
|
+
{
|
|
106
|
+
code: "INITIALIZATION_ERROR",
|
|
107
|
+
message: this._getSanitizer().string(String(error?.message ?? error)),
|
|
108
|
+
},
|
|
109
|
+
]);
|
|
110
|
+
await this.finalizeSafely();
|
|
111
|
+
}
|
|
112
|
+
addPartialReason(reason) {
|
|
113
|
+
this._active?.partialReasons.push(reason);
|
|
114
|
+
}
|
|
115
|
+
abort(reason) {
|
|
116
|
+
if (!this._active) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this._active.outcome = "aborted";
|
|
120
|
+
if (!this._active.partialReasons.some(current => current.code === reason.code && current.message === reason.message)) {
|
|
121
|
+
this._active.partialReasons.push(reason);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
sanitizeMessage(message) {
|
|
125
|
+
return this._getSanitizer().embedded(String(message)).slice(0, 1000);
|
|
126
|
+
}
|
|
127
|
+
async finalize() {
|
|
128
|
+
if (this._finalizePromise) {
|
|
129
|
+
return this._finalizePromise;
|
|
130
|
+
}
|
|
131
|
+
const active = this._active;
|
|
132
|
+
const runtime = this._runtime;
|
|
133
|
+
if (!active || !runtime) {
|
|
134
|
+
return this._lastResult;
|
|
135
|
+
}
|
|
136
|
+
// Assign synchronously so concurrent finalize()/finalizeSafely() join the same run.
|
|
137
|
+
this._finalizePromise = this._finalizeOnce(active, runtime);
|
|
138
|
+
try {
|
|
139
|
+
return await this._finalizePromise;
|
|
140
|
+
}
|
|
141
|
+
finally {
|
|
142
|
+
this._finalizePromise = undefined;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
async finalizeSafely() {
|
|
146
|
+
try {
|
|
147
|
+
await this.finalize();
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
this._warnDelivery("profile finalization", error);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async _finalizeOnce(active, runtime) {
|
|
154
|
+
try {
|
|
155
|
+
runtime.stop();
|
|
156
|
+
const result = this._buildResult(active, runtime);
|
|
157
|
+
this._lastResult = result;
|
|
158
|
+
await this._deliverResult(result);
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
runtime.recordError("finalize", error);
|
|
163
|
+
throw error;
|
|
164
|
+
}
|
|
165
|
+
finally {
|
|
166
|
+
this._active = undefined;
|
|
167
|
+
this._runtime = undefined;
|
|
168
|
+
this._probe = undefined;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
_buildResult(active, runtime) {
|
|
172
|
+
const durationMs = Math.max(0, node_perf_hooks_1.performance.now() - active.originMonotonicMs);
|
|
173
|
+
const normalized = (0, aggregator_1.aggregateProfile)(runtime.snapshot(), durationMs, active.name);
|
|
174
|
+
const compact = (0, compact_1.compactProfileReferences)(normalized.timeline, (0, analyzers_1.runAnalyzers)(normalized));
|
|
175
|
+
const retained = (0, serialized_budget_1.enforceSerializedTimelineBudget)(runtime.level, compact.timeline, compact.findings);
|
|
176
|
+
const sanitizer = this._getSanitizer();
|
|
177
|
+
const collectionErrors = normalized.errors.map(error => sanitizer.error(error.stage, {
|
|
178
|
+
...error,
|
|
179
|
+
message: error.message.replaceAll(`${runtime.runId}:`, ""),
|
|
180
|
+
}));
|
|
181
|
+
const partialReasons = [...active.partialReasons];
|
|
182
|
+
if (collectionErrors.length) {
|
|
183
|
+
partialReasons.push({
|
|
184
|
+
code: "PROFILER_COLLECTION_ERROR",
|
|
185
|
+
message: `${collectionErrors.length} profiler collection or analysis error(s) occurred`,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
const sanitized = sanitizer.sanitizeResult({
|
|
189
|
+
schemaVersion: 1,
|
|
190
|
+
run: {
|
|
191
|
+
id: runtime.runId,
|
|
192
|
+
level: runtime.level,
|
|
193
|
+
operation: active.name,
|
|
194
|
+
profileStatus: partialReasons.length ? "partial" : "complete",
|
|
195
|
+
runOutcome: active.outcome,
|
|
196
|
+
startedAt: active.startedAt,
|
|
197
|
+
durationMs,
|
|
198
|
+
partialReasons,
|
|
199
|
+
},
|
|
200
|
+
environment: {
|
|
201
|
+
node: process.version,
|
|
202
|
+
platform: process.platform,
|
|
203
|
+
arch: process.arch,
|
|
204
|
+
availableParallelism: getAvailableParallelism(),
|
|
205
|
+
configuredWorkers: this._config.system.workers,
|
|
206
|
+
configuredSessionsPerBrowser: Object.fromEntries(this._config
|
|
207
|
+
.getBrowserIds()
|
|
208
|
+
.map(browserId => [browserId, this._config.forBrowser(browserId).sessionsPerBrowser])),
|
|
209
|
+
},
|
|
210
|
+
capabilities: capabilities(runtime.level),
|
|
211
|
+
timeline: retained.timeline,
|
|
212
|
+
aggregates: normalized.aggregates,
|
|
213
|
+
findings: compact.findings,
|
|
214
|
+
dataQuality: {
|
|
215
|
+
clock: normalized.clock,
|
|
216
|
+
coverage: defaultCoverage(runtime.level),
|
|
217
|
+
},
|
|
218
|
+
profiler: {
|
|
219
|
+
collectionErrors,
|
|
220
|
+
truncation: [...normalized.truncation, ...(retained.truncation ? [retained.truncation] : [])],
|
|
221
|
+
inRunOverheadEstimateMs: normalized.overheadMs,
|
|
222
|
+
},
|
|
223
|
+
});
|
|
224
|
+
return sanitizer.freezeResult((0, result_budget_1.enforceSerializedResultBudget)(runtime.level, sanitized));
|
|
225
|
+
}
|
|
226
|
+
async _deliverResult(result) {
|
|
227
|
+
try {
|
|
228
|
+
(0, console_1.printProfilerResult)(result, this._console);
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
this._warnDelivery("console", error);
|
|
232
|
+
}
|
|
233
|
+
const deliveries = [];
|
|
234
|
+
if (this._emitResult) {
|
|
235
|
+
deliveries.push(Promise.resolve().then(() => this._emitResult?.(result)));
|
|
236
|
+
}
|
|
237
|
+
if (this._config.profiler?.output) {
|
|
238
|
+
deliveries.push((0, json_1.writeProfilerJson)(this._config.profiler.output, result));
|
|
239
|
+
}
|
|
240
|
+
const deliveryResults = await Promise.allSettled(deliveries);
|
|
241
|
+
for (const delivery of deliveryResults) {
|
|
242
|
+
if (delivery.status === "rejected") {
|
|
243
|
+
this._warnDelivery("result", delivery.reason);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
_ensureRuntime() {
|
|
248
|
+
return this._runtime ?? this._createRuntime();
|
|
249
|
+
}
|
|
250
|
+
_getSanitizer() {
|
|
251
|
+
this._sanitizer ??= new sanitize_1.ProfilerSanitizer(this._projectRoot);
|
|
252
|
+
return this._sanitizer;
|
|
253
|
+
}
|
|
254
|
+
_createRuntime() {
|
|
255
|
+
const level = this._config.profiler.level;
|
|
256
|
+
const runId = this._initialRunId ?? (0, node_crypto_1.randomUUID)();
|
|
257
|
+
const originMonotonicMs = this._probe?.startedAtMonotonicMs ?? node_perf_hooks_1.performance.now();
|
|
258
|
+
const originEpochMs = (this._probe?.startedAtEpochMs ?? Date.now()) + this._clockOffsetMs;
|
|
259
|
+
const runtime = new runtime_1.ProfilerRuntime({
|
|
260
|
+
runId,
|
|
261
|
+
level,
|
|
262
|
+
originMonotonicMs,
|
|
263
|
+
originEpochMs,
|
|
264
|
+
clockUncertaintyMs: this._clockUncertaintyMs,
|
|
265
|
+
process: this._process,
|
|
266
|
+
});
|
|
267
|
+
runtime.sample("config.workers", this._config.system.workers);
|
|
268
|
+
runtime.sample("config.availableParallelism", getAvailableParallelism());
|
|
269
|
+
for (const browserId of this._config.getBrowserIds()) {
|
|
270
|
+
runtime.sample("config.sessionsPerBrowser", this._config.forBrowser(browserId).sessionsPerBrowser, {
|
|
271
|
+
browserId,
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
if (this._probe) {
|
|
275
|
+
runtime.adoptBootstrapProbe(this._probe);
|
|
276
|
+
}
|
|
277
|
+
this._runtime = runtime;
|
|
278
|
+
return runtime;
|
|
279
|
+
}
|
|
280
|
+
_activateOperation(name, outcome, partialReasons = []) {
|
|
281
|
+
const runtime = this._ensureRuntime();
|
|
282
|
+
const active = {
|
|
283
|
+
name,
|
|
284
|
+
outcome,
|
|
285
|
+
partialReasons,
|
|
286
|
+
startedAt: this._probe?.startedAt ?? new Date().toISOString(),
|
|
287
|
+
originMonotonicMs: runtime.originMonotonicMs,
|
|
288
|
+
};
|
|
289
|
+
this._active = active;
|
|
290
|
+
return active;
|
|
291
|
+
}
|
|
292
|
+
_warnDelivery(channel, error) {
|
|
293
|
+
const message = `[profiler] Failed to deliver ${channel}: ${this._getSanitizer().string(String(error?.message ?? error))}`;
|
|
294
|
+
if (this._console) {
|
|
295
|
+
this._console.warn(message);
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
console.warn(message);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
exports.ProfilerManager = ProfilerManager;
|
|
303
|
+
function capabilities(level) {
|
|
304
|
+
return {
|
|
305
|
+
processCpu: typeof process.cpuUsage === "function" ? "available" : "unavailable",
|
|
306
|
+
threadCpu: typeof process.threadCpuUsage === "function" ? "available" : "unavailable",
|
|
307
|
+
eventLoop: typeof node_perf_hooks_1.performance.eventLoopUtilization === "function" ? "available" : "unavailable",
|
|
308
|
+
asyncActivity: level >= 3 ? "available" : "disabled",
|
|
309
|
+
moduleGraph: level >= 3 ? (typeof NodeModule.registerHooks === "function" ? "cjs-and-esm" : "cjs") : "disabled",
|
|
310
|
+
browserTelemetry: level >= 3 ? "partial" : "disabled",
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function defaultCoverage(level) {
|
|
314
|
+
return [
|
|
315
|
+
{ collector: "lifecycle", status: "complete" },
|
|
316
|
+
{ collector: "resources", status: "complete" },
|
|
317
|
+
coverageAtLevel(level, "events", 2),
|
|
318
|
+
coverageAtLevel(level, "testFiles", 2),
|
|
319
|
+
coverageAtLevel(level, "testsAndHooks", 2),
|
|
320
|
+
coverageAtLevel(level, "workersAndSessions", 2),
|
|
321
|
+
coverageAtLevel(level, "commands", 3, {
|
|
322
|
+
status: "partial",
|
|
323
|
+
reason: "Only observed Testplane browser command boundaries are available",
|
|
324
|
+
}),
|
|
325
|
+
coverageAtLevel(level, "moduleGraph", 3, {
|
|
326
|
+
status: "partial",
|
|
327
|
+
reason: "CJS evaluation and ESM source-load boundaries are not equivalent",
|
|
328
|
+
}),
|
|
329
|
+
coverageAtLevel(level, "browserRuntime", 3, {
|
|
330
|
+
status: "partial",
|
|
331
|
+
reason: "Browser runnable/resource timing is available; browser CPU attribution is unavailable",
|
|
332
|
+
}),
|
|
333
|
+
];
|
|
334
|
+
}
|
|
335
|
+
function coverageAtLevel(level, collector, requiredLevel, available = { status: "complete", reason: undefined }) {
|
|
336
|
+
return level >= requiredLevel
|
|
337
|
+
? { collector, ...available }
|
|
338
|
+
: { collector, status: "unavailable", reason: `Requires level ${requiredLevel}` };
|
|
339
|
+
}
|
|
340
|
+
function getAvailableParallelism() {
|
|
341
|
+
return typeof node_os_1.default.availableParallelism === "function" ? node_os_1.default.availableParallelism() : node_os_1.default.cpus().length;
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manager.js","sourceRoot":"","sources":["../../../src/profiler/manager.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAyB;AACzB,qDAA8C;AAC9C,6CAAyC;AACzC,wDAA0C;AAE1C,sDAAyD;AACzD,oDAAoD;AACpD,gDAA8D;AAC9D,8CAA6E;AAC7E,wCAAkD;AAElD,yCAAqD;AACrD,+CAAoD;AAEpD,yCAA+C;AAC/C,6DAA0E;AAC1E,qEAAgF;AAiChF,MAAa,eAAe;IAiBxB,YAAY,MAAc,EAAE,KAAqB,EAAE,UAAkC,EAAE;QACnF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,IAAI,EAAE,QAAQ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