@forgeax/engine-profiler 0.1.2
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/LICENSE +202 -0
- package/README.md +164 -0
- package/bin/forgeax-engine-profiler.mjs +5 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/__tests__/browser-profile-detail-owner.test-d.d.ts +2 -0
- package/dist/__tests__/browser-profile-detail-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/browser-user-timing.test.d.ts +2 -0
- package/dist/__tests__/browser-user-timing.test.d.ts.map +1 -0
- package/dist/__tests__/cli-consumer.integration.test.d.ts +2 -0
- package/dist/__tests__/cli-consumer.integration.test.d.ts.map +1 -0
- package/dist/__tests__/cli-contract.test.d.ts +2 -0
- package/dist/__tests__/cli-contract.test.d.ts.map +1 -0
- package/dist/__tests__/cli-input-errors.test.d.ts +2 -0
- package/dist/__tests__/cli-input-errors.test.d.ts.map +1 -0
- package/dist/__tests__/cli-process.integration.test.d.ts +2 -0
- package/dist/__tests__/cli-process.integration.test.d.ts.map +1 -0
- package/dist/__tests__/compare.test.d.ts +2 -0
- package/dist/__tests__/compare.test.d.ts.map +1 -0
- package/dist/__tests__/comparison-side-owner.test-d.d.ts +2 -0
- package/dist/__tests__/comparison-side-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/consumer-smoke.integration.test.d.ts +2 -0
- package/dist/__tests__/consumer-smoke.integration.test.d.ts.map +1 -0
- package/dist/__tests__/generated-freshness.test.d.ts +2 -0
- package/dist/__tests__/generated-freshness.test.d.ts.map +1 -0
- package/dist/__tests__/model-determinism.test.d.ts +2 -0
- package/dist/__tests__/model-determinism.test.d.ts.map +1 -0
- package/dist/__tests__/model-query.test.d.ts +2 -0
- package/dist/__tests__/model-query.test.d.ts.map +1 -0
- package/dist/__tests__/overflow-long-tail.test.d.ts +2 -0
- package/dist/__tests__/overflow-long-tail.test.d.ts.map +1 -0
- package/dist/__tests__/profile-source-owner.test-d.d.ts +2 -0
- package/dist/__tests__/profile-source-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/profiler-error-owner.test-d.d.ts +2 -0
- package/dist/__tests__/profiler-error-owner.test-d.d.ts.map +1 -0
- package/dist/__tests__/published-entry.browser.test.d.ts +2 -0
- package/dist/__tests__/published-entry.browser.test.d.ts.map +1 -0
- package/dist/__tests__/recorder-contract.test.d.ts +2 -0
- package/dist/__tests__/recorder-contract.test.d.ts.map +1 -0
- package/dist/__tests__/schema-contract.test.d.ts +2 -0
- package/dist/__tests__/schema-contract.test.d.ts.map +1 -0
- package/dist/__tests__/schema-derived-union-owner.test.d.ts +2 -0
- package/dist/__tests__/schema-derived-union-owner.test.d.ts.map +1 -0
- package/dist/browser-user-timing.d.ts +24 -0
- package/dist/browser-user-timing.d.ts.map +1 -0
- package/dist/browser-user-timing.mjs +140 -0
- package/dist/browser-user-timing.mjs.map +1 -0
- package/dist/cli.d.ts +21 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.mjs +7783 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/clock.d.ts +5 -0
- package/dist/clock.d.ts.map +1 -0
- package/dist/compare.d.ts +42 -0
- package/dist/compare.d.ts.map +1 -0
- package/dist/errors.d.ts +64 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/generated/profile-capture.d.ts +44 -0
- package/dist/generated/profile-capture.d.ts.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +8111 -0
- package/dist/index.mjs.map +1 -0
- package/dist/model.d.ts +44 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/profiler.d.ts +24 -0
- package/dist/profiler.d.ts.map +1 -0
- package/dist/recorder.d.ts +26 -0
- package/dist/recorder.d.ts.map +1 -0
- package/dist/schema.d.ts +13 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/tool-preview-profile.d.ts +33 -0
- package/dist/tool-preview-profile.d.ts.map +1 -0
- package/dist/types.d.ts +44 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +76 -0
- package/schema/profile-capture.schema.json +71 -0
- package/scripts/consume-smoke.mjs +17 -0
- package/scripts/generate-profile-types.mjs +75 -0
- package/src/__tests__/browser-profile-detail-owner.test-d.ts +26 -0
- package/src/__tests__/browser-user-timing.test.ts +127 -0
- package/src/__tests__/cli-consumer.integration.test.ts +113 -0
- package/src/__tests__/cli-contract.test.ts +115 -0
- package/src/__tests__/cli-input-errors.test.ts +210 -0
- package/src/__tests__/cli-process.integration.test.ts +154 -0
- package/src/__tests__/compare.test.ts +223 -0
- package/src/__tests__/comparison-side-owner.test-d.ts +28 -0
- package/src/__tests__/consumer-smoke.integration.test.ts +37 -0
- package/src/__tests__/fixtures/cli/invalid-version.json +18 -0
- package/src/__tests__/fixtures/cli/partial-capture.json +28 -0
- package/src/__tests__/fixtures/cli/valid-capture.json +43 -0
- package/src/__tests__/fixtures/profile-capture/invalid-boundary.json +144 -0
- package/src/__tests__/fixtures/profile-capture/model-input.json +54 -0
- package/src/__tests__/fixtures/profile-capture/sink-failure.json +30 -0
- package/src/__tests__/fixtures/profile-capture/valid-complete.json +43 -0
- package/src/__tests__/fixtures/profile-capture/valid-overflow.json +45 -0
- package/src/__tests__/generated-freshness.test.ts +14 -0
- package/src/__tests__/model-determinism.test.ts +70 -0
- package/src/__tests__/model-query.test.ts +128 -0
- package/src/__tests__/overflow-long-tail.test.ts +131 -0
- package/src/__tests__/profile-source-owner.test-d.ts +45 -0
- package/src/__tests__/profiler-error-owner.test-d.ts +64 -0
- package/src/__tests__/published-entry.browser.test.ts +27 -0
- package/src/__tests__/recorder-contract.test.ts +163 -0
- package/src/__tests__/schema-contract.test.ts +42 -0
- package/src/__tests__/schema-derived-union-owner.test.ts +57 -0
- package/src/browser-user-timing.ts +194 -0
- package/src/cli.ts +425 -0
- package/src/clock.ts +18 -0
- package/src/compare.ts +159 -0
- package/src/errors.ts +78 -0
- package/src/generated/profile-capture.ts +48 -0
- package/src/index.ts +54 -0
- package/src/model.ts +161 -0
- package/src/profiler.ts +201 -0
- package/src/recorder.ts +417 -0
- package/src/schema.ts +168 -0
- package/src/tool-preview-profile.ts +67 -0
- package/src/types.ts +56 -0
package/dist/clock.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clock.d.ts","sourceRoot":"","sources":["../src/clock.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,SAAS,IAAI,MAAM,CAAC;CACrB;AAED,wBAAgB,kBAAkB,CAAC,UAAU,GAAE,MAAM,MAA0B,GAAG,YAAY,CAS7F"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type ProfilePhaseModel, type ProfileSummaryModel } from './model.js';
|
|
2
|
+
import type { ProfileArtifactError } from './schema.js';
|
|
3
|
+
import type { ProfileCapture, ProfileResult } from './types.js';
|
|
4
|
+
export interface ProfileComparisonPhaseIdentity {
|
|
5
|
+
readonly source: ProfilePhaseModel['source'];
|
|
6
|
+
readonly phase: string;
|
|
7
|
+
readonly parentSource?: ProfilePhaseModel['parentSource'];
|
|
8
|
+
readonly parentPhase?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ProfileComparisonPhaseFact {
|
|
11
|
+
readonly count: number;
|
|
12
|
+
readonly skipCount: number;
|
|
13
|
+
readonly p95DurationMicros: number | null;
|
|
14
|
+
}
|
|
15
|
+
export interface ProfileComparisonPhaseDelta {
|
|
16
|
+
readonly count?: number;
|
|
17
|
+
readonly skipCount?: number;
|
|
18
|
+
readonly p95DurationMicros?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ProfileComparisonPhaseRow {
|
|
21
|
+
readonly identity: ProfileComparisonPhaseIdentity;
|
|
22
|
+
readonly left?: ProfileComparisonPhaseFact;
|
|
23
|
+
readonly right?: ProfileComparisonPhaseFact;
|
|
24
|
+
readonly delta?: ProfileComparisonPhaseDelta;
|
|
25
|
+
}
|
|
26
|
+
export interface ProfileComparisonSide {
|
|
27
|
+
readonly summary: ProfileSummaryModel;
|
|
28
|
+
readonly completeness: ProfileCapture['completeness'];
|
|
29
|
+
}
|
|
30
|
+
export interface ProfileComparisonProjection {
|
|
31
|
+
readonly left: ProfileComparisonSide;
|
|
32
|
+
readonly right: ProfileComparisonSide;
|
|
33
|
+
readonly phases: readonly ProfileComparisonPhaseRow[];
|
|
34
|
+
}
|
|
35
|
+
export type ProfileComparisonError = ProfileArtifactError & {
|
|
36
|
+
readonly detail: ProfileArtifactError['detail'] & {
|
|
37
|
+
readonly side: 'left' | 'right';
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/** Compares two imported ProfileCapture artifacts without mutating either input. */
|
|
41
|
+
export declare function compareProfileCaptures(left: unknown, right: unknown): ProfileResult<ProfileComparisonProjection, ProfileComparisonError>;
|
|
42
|
+
//# sourceMappingURL=compare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../src/compare.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhE,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC1D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,QAAQ,EAAE,8BAA8B,CAAC;IAClD,QAAQ,CAAC,IAAI,CAAC,EAAE,0BAA0B,CAAC;IAC3C,QAAQ,CAAC,KAAK,CAAC,EAAE,0BAA0B,CAAC;IAC5C,QAAQ,CAAC,KAAK,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,IAAI,EAAE,qBAAqB,CAAC;IACrC,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACvD;AAED,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;IAC1D,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,GAAG;QAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;KACjC,CAAC;CACH,CAAC;AAgGF,oFAAoF;AACpF,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,GACb,aAAa,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAQpE"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { ProfileResult, ProfileSource } from './types.js';
|
|
2
|
+
/** Structured profiler failure with a code-specific detail payload. */
|
|
3
|
+
export type ProfilerError = {
|
|
4
|
+
readonly code: 'capture-boundary-invalid';
|
|
5
|
+
readonly expected: string;
|
|
6
|
+
readonly hint: string;
|
|
7
|
+
readonly detail: {
|
|
8
|
+
readonly frameLimit: unknown;
|
|
9
|
+
readonly eventLimit: unknown;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
readonly code: 'capture-already-active';
|
|
13
|
+
readonly expected: string;
|
|
14
|
+
readonly hint: string;
|
|
15
|
+
readonly detail: {
|
|
16
|
+
readonly captureId: string;
|
|
17
|
+
};
|
|
18
|
+
} | {
|
|
19
|
+
readonly code: 'profiler-not-enabled';
|
|
20
|
+
readonly expected: string;
|
|
21
|
+
readonly hint: string;
|
|
22
|
+
readonly detail: {
|
|
23
|
+
readonly enabled: false;
|
|
24
|
+
};
|
|
25
|
+
} | {
|
|
26
|
+
readonly code: 'phase-catalog-conflict';
|
|
27
|
+
readonly expected: string;
|
|
28
|
+
readonly hint: string;
|
|
29
|
+
readonly detail: {
|
|
30
|
+
readonly source: ProfileSource;
|
|
31
|
+
readonly expected: readonly string[];
|
|
32
|
+
readonly actual: readonly string[];
|
|
33
|
+
};
|
|
34
|
+
} | {
|
|
35
|
+
readonly code: 'profile-source-failed';
|
|
36
|
+
readonly expected: string;
|
|
37
|
+
readonly hint: string;
|
|
38
|
+
readonly detail: {
|
|
39
|
+
readonly source: string;
|
|
40
|
+
readonly phase: string;
|
|
41
|
+
readonly frameId: number;
|
|
42
|
+
};
|
|
43
|
+
} | {
|
|
44
|
+
readonly code: 'profile-sink-failed';
|
|
45
|
+
readonly expected: string;
|
|
46
|
+
readonly hint: string;
|
|
47
|
+
readonly detail: {
|
|
48
|
+
readonly message: string;
|
|
49
|
+
};
|
|
50
|
+
} | {
|
|
51
|
+
readonly code: 'capture-state-invalid';
|
|
52
|
+
readonly expected: string;
|
|
53
|
+
readonly hint: string;
|
|
54
|
+
readonly detail: {
|
|
55
|
+
readonly operation: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/** Closed expected-failure vocabulary derived from the public profiler error owner. */
|
|
59
|
+
export type ProfilerErrorCode = ProfilerError['code'];
|
|
60
|
+
/** Result shape returned by profiler operations. */
|
|
61
|
+
export type ProfilerResult<T> = ProfileResult<T, ProfilerError>;
|
|
62
|
+
export declare function boundaryError(frameLimit: unknown, eventLimit: unknown): ProfilerError;
|
|
63
|
+
export declare function stateError(operation: string): ProfilerError;
|
|
64
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/D,uEAAuE;AACvE,MAAM,MAAM,aAAa,GACrB;IACE,QAAQ,CAAC,IAAI,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC;CACjF,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,sBAAsB,CAAC;IACtC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,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AC;AAEtD,oDAAoD;AACpD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;AAEhE,wBAAgB,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,GAAG,aAAa,CAOrF;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAO3D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export type ProfileSource = 'app' | 'render';
|
|
2
|
+
export type ProfileRecordKind = 'phase' | 'skip';
|
|
3
|
+
export type ProfileCompletenessStatus = 'complete' | 'partial' | 'overflow';
|
|
4
|
+
export interface ProfilePhaseRecord {
|
|
5
|
+
readonly kind: 'phase';
|
|
6
|
+
readonly source: ProfileSource;
|
|
7
|
+
readonly frameId: number;
|
|
8
|
+
readonly phase: string;
|
|
9
|
+
readonly parentSource?: ProfileSource;
|
|
10
|
+
readonly parentPhase?: string;
|
|
11
|
+
readonly startMicros: number;
|
|
12
|
+
readonly endMicros: number;
|
|
13
|
+
readonly durationMicros: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ProfileSkipRecord {
|
|
16
|
+
readonly kind: 'skip';
|
|
17
|
+
readonly source: ProfileSource;
|
|
18
|
+
readonly frameId: number;
|
|
19
|
+
readonly phase: string;
|
|
20
|
+
readonly reason: string;
|
|
21
|
+
}
|
|
22
|
+
export type ProfileRecord = ProfilePhaseRecord | ProfileSkipRecord;
|
|
23
|
+
export interface ProfileCompleteness {
|
|
24
|
+
readonly status: ProfileCompletenessStatus;
|
|
25
|
+
readonly retainedEventCount: number;
|
|
26
|
+
readonly droppedEventCount: number;
|
|
27
|
+
readonly incompleteReason?: string;
|
|
28
|
+
readonly firstAffectedFrameId?: number;
|
|
29
|
+
readonly lastAffectedFrameId?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ProfileCapture {
|
|
32
|
+
readonly schemaVersion: '1.0';
|
|
33
|
+
readonly captureId: string;
|
|
34
|
+
readonly timeUnit: 'microseconds';
|
|
35
|
+
readonly frameLimit: number;
|
|
36
|
+
readonly eventLimit: number;
|
|
37
|
+
readonly phaseCatalog: Readonly<{
|
|
38
|
+
app: readonly string[];
|
|
39
|
+
render: readonly string[];
|
|
40
|
+
}>;
|
|
41
|
+
readonly records: readonly ProfileRecord[];
|
|
42
|
+
readonly completeness: ProfileCompleteness;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=profile-capture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-capture.d.ts","sourceRoot":"","sources":["../../src/generated/profile-capture.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,CAAC;AAC7C,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC;AACjD,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAEnE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,MAAM,EAAE,yBAAyB,CAAC;IAC3C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IACvC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC;QAAE,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACvF,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,YAAY,EAAE,mBAAmB,CAAC;CAC5C"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Creates the default monotonic microsecond clock. */
|
|
2
|
+
/** Opt-in browser User Timing projection shared by editor and Play hosts. */
|
|
3
|
+
export { createUserTimingProfiler, type UserTimingProfilerOptions, } from './browser-user-timing.js';
|
|
4
|
+
export { createProfileClock } from './clock.js';
|
|
5
|
+
export type { ProfileComparisonError, ProfileComparisonPhaseDelta, ProfileComparisonPhaseFact, ProfileComparisonPhaseIdentity, ProfileComparisonPhaseRow, ProfileComparisonProjection, ProfileComparisonSide, } from './compare.js';
|
|
6
|
+
/** Compares two validated captures without adding policy or mutating either input. */
|
|
7
|
+
export { compareProfileCaptures } from './compare.js';
|
|
8
|
+
/** Structured expected-failure vocabulary for profiler operations. */
|
|
9
|
+
export type { ProfilerError, ProfilerErrorCode } from './errors.js';
|
|
10
|
+
export type { ProfileFrameModel, ProfileModel, ProfilePhaseModel, ProfileSummaryModel, } from './model.js';
|
|
11
|
+
/** Projects a validated capture into offline frame and phase summaries. */
|
|
12
|
+
export { buildProfileModel } from './model.js';
|
|
13
|
+
/** Bounded CPU profiler capability; it is inert until a host passes it to App or Render. */
|
|
14
|
+
export type { Profiler } from './profiler.js';
|
|
15
|
+
/** Creates an opt-in bounded profiler with optional sink and allocation evidence. */
|
|
16
|
+
export { createProfiler } from './profiler.js';
|
|
17
|
+
export type { ProfileDetail, RecorderSession } from './recorder.js';
|
|
18
|
+
/** Validates a persisted capture before model building or CLI-style analysis. */
|
|
19
|
+
export { validateProfileCapture } from './schema.js';
|
|
20
|
+
export { consumeToolPreviewProfile, type ToolPreviewProfileManifest, type ToolPreviewProfileRef, type ToolPreviewProfileResult, } from './tool-preview-profile.js';
|
|
21
|
+
export type { ProfileAllocationReport, ProfileCapture, ProfileCompleteness, ProfileFrameToken, ProfilePhaseRecord, ProfileRecord, ProfileResult, ProfileSink, ProfileSkipRecord, ProfileSource, } from './types.js';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,6EAA6E;AAC7E,OAAO,EACL,wBAAwB,EACxB,KAAK,yBAAyB,GAC/B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EACV,sBAAsB,EACtB,2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