profiler-md 0.1.3 → 0.3.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/dist/cli/index.mjs +3402 -0
- package/dist/index.d.mts +273 -73
- package/dist/index.js +2 -2
- package/docs/formats/jsc-heap-snapshot.md +13 -0
- package/docs/formats/pprof.md +12 -0
- package/docs/formats/speedscope.md +11 -0
- package/docs/formats/v8-cpu-profile.md +13 -0
- package/docs/formats/v8-heap-profile.md +13 -0
- package/docs/formats/v8-heap-snapshot.md +10 -0
- package/docs/formats/webkit-timeline-recording.md +9 -0
- package/docs/languages/c.md +136 -0
- package/docs/languages/go.md +187 -0
- package/docs/languages/java.md +117 -0
- package/docs/languages/javascript.md +219 -0
- package/docs/languages/php.md +31 -0
- package/docs/languages/python.md +112 -0
- package/docs/languages/ruby.md +67 -0
- package/docs/languages/rust.md +44 -0
- package/examples/bun.cpuprofile.md +475 -0
- package/examples/deno.cpuprofile.md +481 -0
- package/examples/jsc-heap-snapshot.json.md +509 -0
- package/examples/node.cpuprofile.md +485 -0
- package/examples/node.heapprofile.md +281 -0
- package/examples/node.heapsnapshot.md +694 -0
- package/examples/node.pprof.md +441 -0
- package/examples/node.speedscope.json.md +408 -0
- package/examples/rust.pprof.md +477 -0
- package/examples/webkit-timeline-recording.json.md +434 -0
- package/package.json +21 -5
- package/readme.md +139 -52
- package/dist/cli.mjs +0 -2346
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { RawSourceMap as SourceMap } from "source-map-js";
|
|
2
|
+
//#region src/helpers/types.d.ts
|
|
3
|
+
type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float16Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
|
|
4
|
+
/**
|
|
5
|
+
* Recursively makes all properties of `T` readonly, including nested objects,
|
|
6
|
+
* arrays, and `Map`/`Set` collections.
|
|
7
|
+
*/
|
|
8
|
+
type DeepReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, DeepReadonly<V>> : T extends Set<infer V> ? ReadonlySet<DeepReadonly<V>> : T extends TypedArray ? Readonly<T> : T extends (infer U)[] ? readonly DeepReadonly<U>[] : T extends object ? { readonly [K in keyof T]: DeepReadonly<T[K]> } : T;
|
|
9
|
+
//#endregion
|
|
2
10
|
//#region src/location.d.ts
|
|
3
11
|
/** A {@link URL} to a file, potentially with line and column information. */
|
|
4
12
|
type ProfileLocation = {
|
|
@@ -7,19 +15,127 @@ type ProfileLocation = {
|
|
|
7
15
|
column?: number;
|
|
8
16
|
};
|
|
9
17
|
//#endregion
|
|
18
|
+
//#region src/profile/aggregate.d.ts
|
|
19
|
+
/**
|
|
20
|
+
* An aggregation of data from every sample involving a given function within a
|
|
21
|
+
* profile.
|
|
22
|
+
*/
|
|
23
|
+
type AggregatedProfileFunction = {
|
|
24
|
+
type: `function`; /** An index that uniquely identifies this function. */
|
|
25
|
+
id: number; /** The name of the function in code. */
|
|
26
|
+
name: string; /** Where the function was defined, if known. */
|
|
27
|
+
location?: ProfileLocation; /** A string describing the category of functions this function belongs to.*/
|
|
28
|
+
category: string;
|
|
29
|
+
/**
|
|
30
|
+
* The number of samples taken directly within the function's body, excluding
|
|
31
|
+
* its callees.
|
|
32
|
+
*/
|
|
33
|
+
selfSampleCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* The number of samples taken directly within the function's body _and_ all
|
|
36
|
+
* its callees.
|
|
37
|
+
*/
|
|
38
|
+
totalSampleCount: number;
|
|
39
|
+
/**
|
|
40
|
+
* For each metric in {@link AggregatedProfile.metrics}, the sum of values from samples
|
|
41
|
+
* taken directly within the function's body, excluding its callees.
|
|
42
|
+
*/
|
|
43
|
+
selfValues: Float64Array;
|
|
44
|
+
/**
|
|
45
|
+
* For each metric in {@link AggregatedProfile.metrics}, the sum of values from samples
|
|
46
|
+
* taken directly within the function's body _and_ all its callees.
|
|
47
|
+
*/
|
|
48
|
+
totalValues: Float64Array; /** 1-based line number to values and sample count for that line. */
|
|
49
|
+
lineToMetrics: Map<number, {
|
|
50
|
+
/**
|
|
51
|
+
* The number of samples taken directly within the function's body at this
|
|
52
|
+
* line.
|
|
53
|
+
*/
|
|
54
|
+
sampleCount: number;
|
|
55
|
+
/**
|
|
56
|
+
* For each metric in {@link AggregatedProfile.metrics}, the sum of values from
|
|
57
|
+
* samples taken directly within the function's body at this line.
|
|
58
|
+
*/
|
|
59
|
+
values: Float64Array;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* Direct caller id to values and sample count with that caller's calls to
|
|
63
|
+
* this function.
|
|
64
|
+
*/
|
|
65
|
+
callerIdToMetrics: Map<number, {
|
|
66
|
+
/** The caller corresponding to the ID. */caller: AggregatedProfileFunction;
|
|
67
|
+
/**
|
|
68
|
+
* The number of samples taken directly within the function's body with
|
|
69
|
+
* this caller.
|
|
70
|
+
*/
|
|
71
|
+
selfSampleCount: number;
|
|
72
|
+
/**
|
|
73
|
+
* For each metric in {@link AggregatedProfile.metrics}, the sum of values from
|
|
74
|
+
* samples taken directly within the function's body with this caller.
|
|
75
|
+
*/
|
|
76
|
+
selfValues: Float64Array;
|
|
77
|
+
}>;
|
|
78
|
+
/**
|
|
79
|
+
* Direct callee id to values and sample count for that callee's calls where
|
|
80
|
+
* this function was a direct or transitive caller.
|
|
81
|
+
*/
|
|
82
|
+
calleeIdToMetrics: Map<number, {
|
|
83
|
+
/** The callee corresponding to the ordinal. */callee: AggregatedProfileFunction;
|
|
84
|
+
/**
|
|
85
|
+
* The number of samples taken directly within the function's, _and_ all
|
|
86
|
+
* its callees, with this callee.
|
|
87
|
+
*/
|
|
88
|
+
totalSampleCount: number;
|
|
89
|
+
/**
|
|
90
|
+
* For each metric in {@link AggregatedProfile.metrics}, the sum of values from
|
|
91
|
+
* samples taken directly within the function's body, _and_ all its
|
|
92
|
+
* callees. with this callee.
|
|
93
|
+
*/
|
|
94
|
+
totalValues: Float64Array;
|
|
95
|
+
}>;
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/snapshot/aggregate.d.ts
|
|
99
|
+
type AggregatedSnapshotNode = {
|
|
100
|
+
type: `node`; /** Unique ID for this node that can also be used as an index. */
|
|
101
|
+
id: number; /** A human readable label for this node. */
|
|
102
|
+
name?: string; /** Bytes allocated directly for this node. */
|
|
103
|
+
selfSize: number;
|
|
104
|
+
/**
|
|
105
|
+
* Bytes allocated for this node, as well as all nodes that would be freed if
|
|
106
|
+
* the node were garbage collected.
|
|
107
|
+
*/
|
|
108
|
+
retainedSize: number; /** The exact location where the node was defined. */
|
|
109
|
+
location?: ProfileLocation;
|
|
110
|
+
};
|
|
111
|
+
//#endregion
|
|
10
112
|
//#region src/options.d.ts
|
|
113
|
+
/** Profile data that can be synchronously parsed and converted to Markdown. */
|
|
114
|
+
type BinaryProfileData = Uint8Array | Iterable<Uint8Array>;
|
|
115
|
+
/**
|
|
116
|
+
* JSON profile data that can be synchronously parsed and converted to Markdown.
|
|
117
|
+
*/
|
|
118
|
+
type JsonProfileData = string | BinaryProfileData;
|
|
119
|
+
/** Profile data that can be asynchronously parsed and converted to Markdown. */
|
|
120
|
+
type AsyncProfileData = Blob | ReadableStream<Uint8Array>;
|
|
121
|
+
/** The category of code an entry originated from. */
|
|
122
|
+
type EntryOrigin = `ours` | `stdlib` | `third-party`;
|
|
11
123
|
/** A single entry in a rendered profile. */
|
|
12
124
|
type ProfileEntry = {
|
|
125
|
+
/** An index that uniquely identifies this entry. */id: number;
|
|
13
126
|
/**
|
|
14
|
-
* The name of the entity corresponding to this entry (e.g. a function name)
|
|
127
|
+
* The name of the entity corresponding to this entry (e.g. a function name)
|
|
128
|
+
* if it has one.
|
|
15
129
|
*/
|
|
16
|
-
name
|
|
130
|
+
name?: string;
|
|
17
131
|
/**
|
|
18
132
|
* The location where the entity corresponding to this entry was defined, or
|
|
19
133
|
* undefined if it's unknown.
|
|
20
134
|
*/
|
|
21
135
|
location?: ProfileLocation;
|
|
22
136
|
};
|
|
137
|
+
/** A aggregated entry in a rendered profile. */
|
|
138
|
+
type AggregatedProfileEntry = AggregatedProfileFunction | AggregatedSnapshotNode;
|
|
23
139
|
/** Options for profile to Markdown converters. */
|
|
24
140
|
type ProfileToMdOptions = {
|
|
25
141
|
/**
|
|
@@ -32,18 +148,17 @@ type ProfileToMdOptions = {
|
|
|
32
148
|
*/
|
|
33
149
|
topN?: number;
|
|
34
150
|
/**
|
|
35
|
-
*
|
|
151
|
+
* Returns an arbitrary category string for this entry.
|
|
36
152
|
*
|
|
37
|
-
*
|
|
153
|
+
* Used to compute a category breakdown in the Markdown output.
|
|
38
154
|
*/
|
|
39
|
-
|
|
155
|
+
categorizeEntry?: (entry: DeepReadonly<ProfileEntry>) => EntryOrigin | (string & {});
|
|
40
156
|
/**
|
|
41
|
-
* Whether the given entry
|
|
157
|
+
* Whether to include the given entry in the Markdown output.
|
|
42
158
|
*
|
|
43
|
-
*
|
|
44
|
-
* decisions about what's important to display.
|
|
159
|
+
* Not showing an entry does not exclude it from metric computations.
|
|
45
160
|
*/
|
|
46
|
-
|
|
161
|
+
showEntry?: (entry: DeepReadonly<AggregatedProfileEntry>) => boolean;
|
|
47
162
|
/**
|
|
48
163
|
* The current working directory to use to make file paths relative in the
|
|
49
164
|
* Markdown output.
|
|
@@ -65,21 +180,63 @@ type ProfileToMdOptions = {
|
|
|
65
180
|
*/
|
|
66
181
|
sourceMaps?: SourceMap[] | Record<string, SourceMap>;
|
|
67
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* Returns an arbitrary category string for this entry.
|
|
185
|
+
*
|
|
186
|
+
* Categorizes into `ours`, `stdlib`, `third-party`, and a few other categories
|
|
187
|
+
* by default.
|
|
188
|
+
*/
|
|
189
|
+
declare const defaultCategorizeEntry: (entry: DeepReadonly<ProfileEntry>) => EntryOrigin | (string & {});
|
|
68
190
|
/**
|
|
69
191
|
* Returns whether to include the given entry in the Markdown output.
|
|
70
192
|
*
|
|
71
|
-
* Excludes synthetic
|
|
193
|
+
* Excludes synthetic and external-private entries.
|
|
194
|
+
*/
|
|
195
|
+
declare const defaultShowEntry: (entry: DeepReadonly<AggregatedProfileEntry>) => boolean;
|
|
196
|
+
/**
|
|
197
|
+
* Returns true if the entry is a synthetic artifacts.
|
|
198
|
+
*
|
|
199
|
+
* These entries are artifacts generated by the profiler and don't correspond to
|
|
200
|
+
* something that actually exists in code or at runtime. For example, a
|
|
201
|
+
* synthetic `(root)` node is typically created for heap snapshots.
|
|
202
|
+
*/
|
|
203
|
+
declare const isSyntheticEntry: ({
|
|
204
|
+
name
|
|
205
|
+
}: DeepReadonly<AggregatedProfileEntry>) => boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Returns true if the entry corresponds to an external function (`stdlib` or
|
|
208
|
+
* `third-party`) that's never directly called by `ours` code.
|
|
209
|
+
*
|
|
210
|
+
* These entries are typically implementation details of external code that your
|
|
211
|
+
* own code cannot directly call. Excluding these entries from the Markdown
|
|
212
|
+
* leaves only your code and the public API surface of stdlib and third-pary
|
|
213
|
+
* code.
|
|
214
|
+
*/
|
|
215
|
+
declare const isExternalPrivateEntry: (entry: DeepReadonly<AggregatedProfileEntry>) => boolean;
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/formats/jsc-heap-snapshot/index.d.ts
|
|
218
|
+
/**
|
|
219
|
+
* Converts the given JSC heap snapshot to Markdown.
|
|
220
|
+
*
|
|
221
|
+
* It is assumed that {@link data} is a valid snapshot. The behavior of this
|
|
222
|
+
* function is undefined for invalid snapshots.
|
|
223
|
+
*
|
|
224
|
+
* See the [JSC heap snapshot docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/jsc-heap-snapshot.md)
|
|
225
|
+
* for supported runtimes and generation instructions
|
|
226
|
+
* (`profiler-md --help jsc-heap-snapshot`).
|
|
72
227
|
*/
|
|
73
|
-
declare const
|
|
74
|
-
name,
|
|
75
|
-
location
|
|
76
|
-
}: ProfileEntry) => boolean;
|
|
228
|
+
declare const jscHeapSnapshotToMd: (data: JsonProfileData, options?: ProfileToMdOptions) => string;
|
|
77
229
|
/**
|
|
78
|
-
*
|
|
230
|
+
* Asynchronously converts the given JSC heap snapshot to Markdown.
|
|
231
|
+
*
|
|
232
|
+
* It is assumed that {@link data} is a valid snapshot. The behavior of this
|
|
233
|
+
* function is undefined for invalid snapshots.
|
|
79
234
|
*
|
|
80
|
-
*
|
|
235
|
+
* See the [JSC heap snapshot docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/jsc-heap-snapshot.md)
|
|
236
|
+
* for supported runtimes and generation instructions
|
|
237
|
+
* (`profiler-md --help jsc-heap-snapshot`).
|
|
81
238
|
*/
|
|
82
|
-
declare const
|
|
239
|
+
declare const jscHeapSnapshotToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
83
240
|
//#endregion
|
|
84
241
|
//#region src/formats/pprof/index.d.ts
|
|
85
242
|
/**
|
|
@@ -88,32 +245,44 @@ declare const defaultIsThirdPartyEntry: (entry: ProfileEntry) => boolean;
|
|
|
88
245
|
* It is assumed that {@link data} is a valid pprof (raw protobuf). The behavior
|
|
89
246
|
* of this function is undefined for invalid profiles.
|
|
90
247
|
*
|
|
91
|
-
*
|
|
92
|
-
* -
|
|
93
|
-
* - Node.js's [`pprof`](https://www.npmjs.com/package/pprof) npm package
|
|
94
|
-
* - Python's [`py-spy`](https://github.com/benfred/py-spy)
|
|
95
|
-
* - Rust's [`pprof-rs`](https://github.com/tikv/pprof-rs)
|
|
96
|
-
* - Java/Kotlin's [`async-profiler`](https://github.com/async-profiler/async-profiler)
|
|
97
|
-
* - C/C++'s [`gperftools`](https://github.com/gperftools/gperftools) (via `pprof --proto`)
|
|
248
|
+
* See the [pprof docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/pprof.md)
|
|
249
|
+
* for supported tools and generation instructions (`profiler-md --help pprof`).
|
|
98
250
|
*/
|
|
99
|
-
declare const pprofToMd: (data:
|
|
251
|
+
declare const pprofToMd: (data: BinaryProfileData, options?: ProfileToMdOptions) => string;
|
|
252
|
+
/**
|
|
253
|
+
* Asynchronously converts the given pprof to Markdown.
|
|
254
|
+
*
|
|
255
|
+
* It is assumed that {@link data} is a valid pprof (raw protobuf). The behavior
|
|
256
|
+
* of this function is undefined for invalid profiles.
|
|
257
|
+
*
|
|
258
|
+
* See the [pprof docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/pprof.md)
|
|
259
|
+
* for supported tools and generation instructions (`profiler-md --help pprof`).
|
|
260
|
+
*/
|
|
261
|
+
declare const pprofToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
100
262
|
//#endregion
|
|
101
263
|
//#region src/formats/speedscope/index.d.ts
|
|
102
264
|
/**
|
|
103
|
-
* Converts the given
|
|
265
|
+
* Converts the given Speedscope profile to Markdown.
|
|
266
|
+
*
|
|
267
|
+
* It is assumed that {@link data} is a valid Speedscope JSON file. The behavior
|
|
268
|
+
* of this function is undefined for invalid profiles.
|
|
269
|
+
*
|
|
270
|
+
* See the [Speedscope docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/speedscope.md)
|
|
271
|
+
* for supported tools and generation instructions
|
|
272
|
+
* (`profiler-md --help speedscope`).
|
|
273
|
+
*/
|
|
274
|
+
declare const speedscopeProfileToMd: (data: JsonProfileData, options?: ProfileToMdOptions) => string;
|
|
275
|
+
/**
|
|
276
|
+
* Asynchronously converts the given Speedscope profile to Markdown.
|
|
104
277
|
*
|
|
105
|
-
* It is assumed that {@link data} is a valid
|
|
278
|
+
* It is assumed that {@link data} is a valid Speedscope JSON file. The behavior
|
|
106
279
|
* of this function is undefined for invalid profiles.
|
|
107
280
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* -
|
|
111
|
-
* - [py-spy](https://github.com/benfred/py-spy) for Python (`--format speedscope`)
|
|
112
|
-
* - [pprof-rs](https://github.com/tikv/pprof-rs) for Rust
|
|
113
|
-
* - [async-profiler](https://github.com/async-profiler/async-profiler) for Java/Kotlin (`-o speedscope`)
|
|
114
|
-
* - [phpspy](https://github.com/adsr/phpspy) for PHP (`--output-format=speedscope`)
|
|
281
|
+
* See the [Speedscope docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/speedscope.md)
|
|
282
|
+
* for supported tools and generation instructions
|
|
283
|
+
* (`profiler-md --help speedscope`).
|
|
115
284
|
*/
|
|
116
|
-
declare const
|
|
285
|
+
declare const speedscopeProfileToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
117
286
|
//#endregion
|
|
118
287
|
//#region src/formats/v8/cpu-profile/index.d.ts
|
|
119
288
|
/**
|
|
@@ -122,21 +291,22 @@ declare const speedscopeProfileToMd: (data: string | Uint8Array, options?: Profi
|
|
|
122
291
|
* It is assumed that {@link data} is a valid profile. The behavior of this
|
|
123
292
|
* function is undefined for invalid profiles.
|
|
124
293
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* -
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
|
|
139
|
-
|
|
294
|
+
* See the [V8 CPU profile docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-cpu-profile.md)
|
|
295
|
+
* for supported runtimes and generation instructions
|
|
296
|
+
* (`profiler-md --help v8-cpu-profile`).
|
|
297
|
+
*/
|
|
298
|
+
declare const v8CpuProfileToMd: (data: JsonProfileData, options?: ProfileToMdOptions) => string;
|
|
299
|
+
/**
|
|
300
|
+
* Asynchronously converts the given V8 CPU profile to Markdown.
|
|
301
|
+
*
|
|
302
|
+
* It is assumed that {@link data} is a valid profile. The behavior of this
|
|
303
|
+
* function is undefined for invalid profiles.
|
|
304
|
+
*
|
|
305
|
+
* See the [V8 CPU profile docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-cpu-profile.md)
|
|
306
|
+
* for supported runtimes and generation instructions
|
|
307
|
+
* (`profiler-md --help v8-cpu-profile`).
|
|
308
|
+
*/
|
|
309
|
+
declare const v8CpuProfileToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
140
310
|
//#endregion
|
|
141
311
|
//#region src/formats/v8/heap-profile/index.d.ts
|
|
142
312
|
/**
|
|
@@ -145,18 +315,22 @@ declare const v8CpuProfileToMd: (data: string | Uint8Array, options?: ProfileToM
|
|
|
145
315
|
* It is assumed that {@link data} is a valid profile. The behavior of this
|
|
146
316
|
* function is undefined for invalid profiles.
|
|
147
317
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* -
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
*
|
|
318
|
+
* See the [V8 heap profile docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-heap-profile.md)
|
|
319
|
+
* for supported runtimes and generation instructions
|
|
320
|
+
* (`profiler-md --help v8-heap-profile`).
|
|
321
|
+
*/
|
|
322
|
+
declare const v8HeapProfileToMd: (data: JsonProfileData, options?: ProfileToMdOptions) => string;
|
|
323
|
+
/**
|
|
324
|
+
* Asynchronously converts the given V8 sampling heap profile to Markdown.
|
|
325
|
+
*
|
|
326
|
+
* It is assumed that {@link data} is a valid profile. The behavior of this
|
|
327
|
+
* function is undefined for invalid profiles.
|
|
155
328
|
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
329
|
+
* See the [V8 heap profile docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-heap-profile.md)
|
|
330
|
+
* for supported runtimes and generation instructions
|
|
331
|
+
* (`profiler-md --help v8-heap-profile`).
|
|
158
332
|
*/
|
|
159
|
-
declare const
|
|
333
|
+
declare const v8HeapProfileToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
160
334
|
//#endregion
|
|
161
335
|
//#region src/formats/v8/heap-snapshot/index.d.ts
|
|
162
336
|
/**
|
|
@@ -165,17 +339,43 @@ declare const v8HeapProfileToMd: (data: string | Uint8Array, options?: ProfileTo
|
|
|
165
339
|
* It is assumed that {@link data} is a valid snapshot. The behavior of this
|
|
166
340
|
* function is undefined for invalid snapshots.
|
|
167
341
|
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* -
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
|
|
179
|
-
|
|
342
|
+
* See the [V8 heap snapshot docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-heap-snapshot.md)
|
|
343
|
+
* for supported runtimes and generation instructions
|
|
344
|
+
* (`profiler-md --help v8-heap-snapshot`).
|
|
345
|
+
*/
|
|
346
|
+
declare const v8HeapSnapshotToMd: (data: JsonProfileData, options?: ProfileToMdOptions) => string;
|
|
347
|
+
/**
|
|
348
|
+
* Asynchronously converts the given V8 heap snapshot to Markdown.
|
|
349
|
+
*
|
|
350
|
+
* It is assumed that {@link data} is a valid snapshot. The behavior of this
|
|
351
|
+
* function is undefined for invalid snapshots.
|
|
352
|
+
*
|
|
353
|
+
* See the [V8 heap snapshot docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-heap-snapshot.md)
|
|
354
|
+
* for supported runtimes and generation instructions
|
|
355
|
+
* (`profiler-md --help v8-heap-snapshot`).
|
|
356
|
+
*/
|
|
357
|
+
declare const v8HeapSnapshotToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/formats/webkit-timeline-recording/index.d.ts
|
|
360
|
+
/**
|
|
361
|
+
* Converts the given WebKit timeline recording to Markdown.
|
|
362
|
+
*
|
|
363
|
+
* It is assumed that {@link data} is a valid recording. The behavior of this
|
|
364
|
+
* function is undefined for invalid recordings.
|
|
365
|
+
*
|
|
366
|
+
* See the [WebKit timeline recording docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/webkit-timeline-recording.md)
|
|
367
|
+
* for generation instructions (`profiler-md --help webkit-timeline-recording`).
|
|
368
|
+
*/
|
|
369
|
+
declare const webkitTimelineRecordingToMd: (data: JsonProfileData, options?: ProfileToMdOptions) => string;
|
|
370
|
+
/**
|
|
371
|
+
* Asynchronously converts the given WebKit timeline recording to Markdown.
|
|
372
|
+
*
|
|
373
|
+
* It is assumed that {@link data} is a valid recording. The behavior of this
|
|
374
|
+
* function is undefined for invalid recordings.
|
|
375
|
+
*
|
|
376
|
+
* See the [WebKit timeline recording docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/webkit-timeline-recording.md)
|
|
377
|
+
* for generation instructions (`profiler-md --help webkit-timeline-recording`).
|
|
378
|
+
*/
|
|
379
|
+
declare const webkitTimelineRecordingToMdAsync: (data: AsyncProfileData, options?: ProfileToMdOptions) => Promise<string>;
|
|
180
380
|
//#endregion
|
|
181
|
-
export { type ProfileEntry, type ProfileToMdOptions, type SourceMap,
|
|
381
|
+
export { type AggregatedProfileEntry, type AsyncProfileData, type BinaryProfileData, type EntryOrigin, type JsonProfileData, type ProfileEntry, type ProfileToMdOptions, type SourceMap, defaultCategorizeEntry, defaultShowEntry, isExternalPrivateEntry, isSyntheticEntry, jscHeapSnapshotToMd, jscHeapSnapshotToMdAsync, pprofToMd, pprofToMdAsync, speedscopeProfileToMd, speedscopeProfileToMdAsync, v8CpuProfileToMd, v8CpuProfileToMdAsync, v8HeapProfileToMd, v8HeapProfileToMdAsync, v8HeapSnapshotToMd, v8HeapSnapshotToMdAsync, webkitTimelineRecordingToMd, webkitTimelineRecordingToMdAsync };
|