@atlaspack/profiler 2.14.18-typescript-b27501580.0 → 2.14.18-typescript-e99c742e9.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/lib/SamplingProfiler.d.ts +37 -0
- package/lib/Trace.d.ts +14 -0
- package/lib/Tracer.d.ts +32 -0
- package/lib/index.d.ts +4 -0
- package/lib/types.d.ts +7 -0
- package/package.json +5 -5
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Session } from 'inspector';
|
|
2
|
+
export type Profile = {
|
|
3
|
+
nodes: Array<ProfileNode>;
|
|
4
|
+
startTime: number;
|
|
5
|
+
endTime: number;
|
|
6
|
+
samples?: Array<number>;
|
|
7
|
+
timeDeltas?: Array<number>;
|
|
8
|
+
};
|
|
9
|
+
type ProfileNode = {
|
|
10
|
+
id: number;
|
|
11
|
+
callFrame: CallFrame;
|
|
12
|
+
hitCount?: number;
|
|
13
|
+
children?: Array<number>;
|
|
14
|
+
deoptReason?: string;
|
|
15
|
+
positionTicks?: PositionTickInfo;
|
|
16
|
+
};
|
|
17
|
+
type CallFrame = {
|
|
18
|
+
functionName: string;
|
|
19
|
+
scriptId: string;
|
|
20
|
+
url: string;
|
|
21
|
+
lineNumber: string;
|
|
22
|
+
columnNumber: string;
|
|
23
|
+
};
|
|
24
|
+
type PositionTickInfo = {
|
|
25
|
+
line: number;
|
|
26
|
+
ticks: number;
|
|
27
|
+
};
|
|
28
|
+
export default class SamplingProfiler {
|
|
29
|
+
session: Session;
|
|
30
|
+
startProfiling(): Promise<unknown>;
|
|
31
|
+
sendCommand(method: string, params?: any): Promise<{
|
|
32
|
+
profile: Profile;
|
|
33
|
+
}>;
|
|
34
|
+
destroy(): void;
|
|
35
|
+
stopProfiling(): Promise<Profile>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
package/lib/Trace.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Profile } from './SamplingProfiler';
|
|
2
|
+
import type { Writable } from 'stream';
|
|
3
|
+
import { Tracer } from 'chrome-trace-event';
|
|
4
|
+
export default class Trace {
|
|
5
|
+
tracer: Tracer;
|
|
6
|
+
tid: number;
|
|
7
|
+
eventId: number;
|
|
8
|
+
constructor();
|
|
9
|
+
getEventId(): number;
|
|
10
|
+
init(ts: number): void;
|
|
11
|
+
addCPUProfile(name: string, profile: Profile): void;
|
|
12
|
+
pipe(writable: Writable): Writable;
|
|
13
|
+
flush(): void;
|
|
14
|
+
}
|
package/lib/Tracer.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { TraceEvent, IDisposable, PluginTracer as IPluginTracer } from '@atlaspack/types';
|
|
2
|
+
import type { TraceMeasurement as ITraceMeasurement } from './types';
|
|
3
|
+
export default class Tracer {
|
|
4
|
+
#private;
|
|
5
|
+
onTrace(cb: (event: TraceEvent) => unknown): IDisposable;
|
|
6
|
+
wrap(name: string, fn: () => unknown): Promise<void>;
|
|
7
|
+
createMeasurement(name: string, category?: string, argumentName?: string, otherArgs?: {
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}): ITraceMeasurement | null;
|
|
10
|
+
get enabled(): boolean;
|
|
11
|
+
enable(): void;
|
|
12
|
+
disable(): void;
|
|
13
|
+
trace(event: TraceEvent): void;
|
|
14
|
+
}
|
|
15
|
+
export declare const tracer: Tracer;
|
|
16
|
+
type TracerOpts = {
|
|
17
|
+
origin: string;
|
|
18
|
+
category: string;
|
|
19
|
+
};
|
|
20
|
+
export declare class PluginTracer implements IPluginTracer {
|
|
21
|
+
/** @private */
|
|
22
|
+
origin: string;
|
|
23
|
+
/** @private */
|
|
24
|
+
category: string;
|
|
25
|
+
/** @private */
|
|
26
|
+
constructor(opts: TracerOpts);
|
|
27
|
+
get enabled(): boolean;
|
|
28
|
+
createMeasurement(name: string, category?: string, argumentName?: string, otherArgs?: {
|
|
29
|
+
[key: string]: unknown;
|
|
30
|
+
}): ITraceMeasurement | null;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/lib/index.d.ts
ADDED
package/lib/types.d.ts
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/profiler",
|
|
3
|
-
"version": "2.14.18-typescript-
|
|
3
|
+
"version": "2.14.18-typescript-e99c742e9.0",
|
|
4
4
|
"description": "Blazing fast, zero configuration web application bundler",
|
|
5
5
|
"license": "(MIT OR Apache-2.0)",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"check-ts": "tsc --emitDeclarationOnly --rootDir src"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@atlaspack/diagnostic": "2.14.2-typescript-
|
|
24
|
-
"@atlaspack/events": "2.14.2-typescript-
|
|
25
|
-
"@atlaspack/types-internal": "2.15.3-typescript-
|
|
23
|
+
"@atlaspack/diagnostic": "2.14.2-typescript-e99c742e9.0",
|
|
24
|
+
"@atlaspack/events": "2.14.2-typescript-e99c742e9.0",
|
|
25
|
+
"@atlaspack/types-internal": "2.15.3-typescript-e99c742e9.0",
|
|
26
26
|
"chrome-trace-event": "^1.0.2"
|
|
27
27
|
},
|
|
28
28
|
"type": "commonjs",
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "e99c742e92175ac411d807daf2ba45d5bacebb58"
|
|
30
30
|
}
|