profiler-md 0.1.3 → 0.2.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.mjs → cli/index.mjs} +794 -176
- package/dist/index.d.mts +16 -49
- package/dist/index.js +1 -1
- 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/languages/c.md +136 -0
- package/docs/languages/go.md +187 -0
- package/docs/languages/java.md +117 -0
- package/docs/languages/javascript.md +185 -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 +497 -0
- package/examples/deno.cpuprofile.md +488 -0
- package/examples/node.cpuprofile.md +499 -0
- package/examples/node.heapprofile.md +326 -0
- package/examples/node.heapsnapshot.md +692 -0
- package/examples/node.pprof.md +450 -0
- package/examples/node.speedscope.json.md +416 -0
- package/examples/rust1.pprof.md +480 -0
- package/examples/rust2.pprof.md +480 -0
- package/package.json +10 -3
- package/readme.md +28 -3
package/dist/index.d.mts
CHANGED
|
@@ -88,30 +88,21 @@ declare const defaultIsThirdPartyEntry: (entry: ProfileEntry) => boolean;
|
|
|
88
88
|
* It is assumed that {@link data} is a valid pprof (raw protobuf). The behavior
|
|
89
89
|
* of this function is undefined for invalid profiles.
|
|
90
90
|
*
|
|
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`)
|
|
91
|
+
* See the [pprof docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/pprof.md)
|
|
92
|
+
* for supported tools and generation instructions (`profiler-md --help pprof`).
|
|
98
93
|
*/
|
|
99
94
|
declare const pprofToMd: (data: Uint8Array, options?: ProfileToMdOptions) => string;
|
|
100
95
|
//#endregion
|
|
101
96
|
//#region src/formats/speedscope/index.d.ts
|
|
102
97
|
/**
|
|
103
|
-
* Converts the given
|
|
98
|
+
* Converts the given Speedscope profile to Markdown.
|
|
104
99
|
*
|
|
105
|
-
* It is assumed that {@link data} is a valid
|
|
100
|
+
* It is assumed that {@link data} is a valid Speedscope JSON file. The behavior
|
|
106
101
|
* of this function is undefined for invalid profiles.
|
|
107
102
|
*
|
|
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`)
|
|
103
|
+
* See the [Speedscope docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/speedscope.md)
|
|
104
|
+
* for supported tools and generation instructions
|
|
105
|
+
* (`profiler-md --help speedscope`).
|
|
115
106
|
*/
|
|
116
107
|
declare const speedscopeProfileToMd: (data: string | Uint8Array, options?: ProfileToMdOptions) => string;
|
|
117
108
|
//#endregion
|
|
@@ -122,19 +113,9 @@ declare const speedscopeProfileToMd: (data: string | Uint8Array, options?: Profi
|
|
|
122
113
|
* It is assumed that {@link data} is a valid profile. The behavior of this
|
|
123
114
|
* function is undefined for invalid profiles.
|
|
124
115
|
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
* -
|
|
128
|
-
* - [`bun --cpu-prof`](https://bun.com/docs/project/benchmarking#cpu-profiling)
|
|
129
|
-
* (NOTE: output was incorrect until
|
|
130
|
-
* [v1.3.13](https://bun.com/blog/bun-v1.3.13#node-js-compatibility-improvements))
|
|
131
|
-
* - [`node --inspect`](https://nodejs.org/api/debugger.html#v8-inspector-integration-for-nodejs),
|
|
132
|
-
* [`deno run --inspect`](https://docs.deno.com/runtime/fundamentals/debugging/#--inspect),
|
|
133
|
-
* or [`bun --inspect`](https://bun.com/docs/runtime/debugger#inspect) with
|
|
134
|
-
* [Chrome DevTools](https://developer.chrome.com/docs/devtools/performance/nodejs)
|
|
135
|
-
* - [Chrome DevTools directly](https://developer.chrome.com/docs/devtools/performance#record)
|
|
136
|
-
*
|
|
137
|
-
* Lower the sampling interval to capture more granular data.
|
|
116
|
+
* See the [V8 CPU profile docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-cpu-profile.md)
|
|
117
|
+
* for supported runtimes and generation instructions
|
|
118
|
+
* (`profiler-md --help v8-cpu-profile`).
|
|
138
119
|
*/
|
|
139
120
|
declare const v8CpuProfileToMd: (data: string | Uint8Array, options?: ProfileToMdOptions) => string;
|
|
140
121
|
//#endregion
|
|
@@ -145,16 +126,9 @@ declare const v8CpuProfileToMd: (data: string | Uint8Array, options?: ProfileToM
|
|
|
145
126
|
* It is assumed that {@link data} is a valid profile. The behavior of this
|
|
146
127
|
* function is undefined for invalid profiles.
|
|
147
128
|
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* -
|
|
151
|
-
* [`deno run --inspect`](https://docs.deno.com/runtime/fundamentals/debugging/#--inspect),
|
|
152
|
-
* or [`bun --inspect`](https://bun.com/docs/runtime/debugger#inspect) with
|
|
153
|
-
* [Chrome DevTools](https://developer.chrome.com/docs/devtools/memory-problems/allocation-profiler)
|
|
154
|
-
* - [Chrome DevTools directly](https://developer.chrome.com/docs/devtools/memory-problems/allocation-profiler)
|
|
155
|
-
*
|
|
156
|
-
* Note that [`bun --heap-prof`](https://bun.com/docs/project/benchmarking#heap-profiling)
|
|
157
|
-
* generates a heap _snapshot_ on exit, not a heap _profile_.
|
|
129
|
+
* See the [V8 heap profile docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-heap-profile.md)
|
|
130
|
+
* for supported runtimes and generation instructions
|
|
131
|
+
* (`profiler-md --help v8-heap-profile`).
|
|
158
132
|
*/
|
|
159
133
|
declare const v8HeapProfileToMd: (data: string | Uint8Array, options?: ProfileToMdOptions) => string;
|
|
160
134
|
//#endregion
|
|
@@ -165,16 +139,9 @@ declare const v8HeapProfileToMd: (data: string | Uint8Array, options?: ProfileTo
|
|
|
165
139
|
* It is assumed that {@link data} is a valid snapshot. The behavior of this
|
|
166
140
|
* function is undefined for invalid snapshots.
|
|
167
141
|
*
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
* -
|
|
171
|
-
* - [`bun --heap-prof`](https://bun.com/docs/project/benchmarking#heap-profiling)
|
|
172
|
-
* - [`v8.writeHeapSnapshot()`](https://nodejs.org/api/v8.html#v8writeheapsnapshotfilename)
|
|
173
|
-
* - [`node --inspect`](https://nodejs.org/api/debugger.html#v8-inspector-integration-for-nodejs),
|
|
174
|
-
* [`deno run --inspect`](https://docs.deno.com/runtime/fundamentals/debugging/#--inspect),
|
|
175
|
-
* or [`bun --inspect`](https://bun.com/docs/runtime/debugger#inspect) with
|
|
176
|
-
* [Chrome DevTools](https://developer.chrome.com/docs/devtools/memory-problems/heap-snapshots)
|
|
177
|
-
* - [Chrome DevTools directly](https://developer.chrome.com/docs/devtools/memory-problems/heap-snapshots)
|
|
142
|
+
* See the [V8 heap snapshot docs](https://github.com/TomerAberbach/profiler-md/blob/main/docs/formats/v8-heap-snapshot.md)
|
|
143
|
+
* for supported runtimes and generation instructions
|
|
144
|
+
* (`profiler-md --help v8-heap-snapshot`).
|
|
178
145
|
*/
|
|
179
146
|
declare const v8HeapSnapshotToMd: (data: string | Uint8Array, options?: ProfileToMdOptions) => string;
|
|
180
147
|
//#endregion
|