1 | type JSSelfProfileSampleMarker = 'script' | 'gc' | 'style' | 'layout' | 'paint' | 'other';
|
2 | export type JSSelfProfileSample = {
|
3 | timestamp: number;
|
4 | stackId?: number;
|
5 | marker?: JSSelfProfileSampleMarker;
|
6 | };
|
7 | export type JSSelfProfileStack = {
|
8 | frameId: number;
|
9 | parentId?: number;
|
10 | };
|
11 | export type JSSelfProfileFrame = {
|
12 | name: string;
|
13 | resourceId?: number;
|
14 | line?: number;
|
15 | column?: number;
|
16 | };
|
17 | export type JSSelfProfile = {
|
18 | resources: string[];
|
19 | frames: JSSelfProfileFrame[];
|
20 | stacks: JSSelfProfileStack[];
|
21 | samples: JSSelfProfileSample[];
|
22 | };
|
23 | export interface JSSelfProfiler {
|
24 | sampleInterval: number;
|
25 | stopped: boolean;
|
26 | stop: () => Promise<JSSelfProfile>;
|
27 | addEventListener(event: 'samplebufferfull', callback: (trace: JSSelfProfile) => void): void;
|
28 | }
|
29 | export declare const JSSelfProfilerConstructor: {
|
30 | new (options: {
|
31 | sampleInterval: number;
|
32 | maxBufferSize: number;
|
33 | }): JSSelfProfiler;
|
34 | };
|
35 | declare global {
|
36 | interface Window {
|
37 | Profiler: typeof JSSelfProfilerConstructor | undefined;
|
38 | }
|
39 | }
|
40 | export {};
|
41 |
|
\ | No newline at end of file |