profiler-md 0.1.0 → 0.1.1
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 +6 -1
- package/dist/index.d.mts +5 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/readme.md +22 -3
package/dist/cli.mjs
CHANGED
|
@@ -940,6 +940,8 @@ const detectPprof = (data) => {
|
|
|
940
940
|
* - Node.js's [`pprof`](https://www.npmjs.com/package/pprof) npm package
|
|
941
941
|
* - Python's [`py-spy`](https://github.com/benfred/py-spy)
|
|
942
942
|
* - Rust's [`pprof-rs`](https://github.com/tikv/pprof-rs)
|
|
943
|
+
* - Java/Kotlin's [`async-profiler`](https://github.com/async-profiler/async-profiler)
|
|
944
|
+
* - C/C++'s [`gperftools`](https://github.com/gperftools/gperftools) (via `pprof --proto`)
|
|
943
945
|
*/
|
|
944
946
|
const pprofToMd = (data, options) => pprofToMdInternal(parsePprof(data), options);
|
|
945
947
|
const pprofToMdInternal = (pprof, options) => {
|
|
@@ -1044,6 +1046,8 @@ const detectSpeedscopeProfile = (json) => {
|
|
|
1044
1046
|
* - [rbspy](https://rbspy.github.io) for Ruby
|
|
1045
1047
|
* - [py-spy](https://github.com/benfred/py-spy) for Python (`--format speedscope`)
|
|
1046
1048
|
* - [pprof-rs](https://github.com/tikv/pprof-rs) for Rust
|
|
1049
|
+
* - [async-profiler](https://github.com/async-profiler/async-profiler) for Java/Kotlin (`-o speedscope`)
|
|
1050
|
+
* - [phpspy](https://github.com/adsr/phpspy) for PHP (`--output-format=speedscope`)
|
|
1047
1051
|
*/
|
|
1048
1052
|
const speedscopeProfileToMd = (data, options) => speedscopeProfileToMdInternal(parseSpeedscopeProfile(data), options);
|
|
1049
1053
|
const speedscopeProfileToMdInternal = (profile, options) => {
|
|
@@ -2060,6 +2064,7 @@ const detectV8HeapSnapshot = (json) => {
|
|
|
2060
2064
|
* function is undefined for invalid snapshots.
|
|
2061
2065
|
*
|
|
2062
2066
|
* You can generate a V8 heap snapshot in several ways:
|
|
2067
|
+
* - [`node --heapsnapshot-near-heap-limit=1`](https://nodejs.org/api/cli.html#heapsnapshot-near-heap-limitmax-count)
|
|
2063
2068
|
* - [`node --heapsnapshot-signal`](https://nodejs.org/api/cli.html#--heapsnapshot-signalsignal)
|
|
2064
2069
|
* - [`bun --heap-prof`](https://bun.com/docs/project/benchmarking#heap-profiling)
|
|
2065
2070
|
* - [`v8.writeHeapSnapshot()`](https://nodejs.org/api/v8.html#v8writeheapsnapshotfilename)
|
|
@@ -2115,7 +2120,7 @@ const cli = meow(`
|
|
|
2115
2120
|
|
|
2116
2121
|
Options:
|
|
2117
2122
|
-t, --type <type> Profile type, auto-detected from content if omitted
|
|
2118
|
-
[${profileConverters.map(({ type }) => type).join(`|`)}]
|
|
2123
|
+
[${profileConverters.map(({ type }) => type).sort().join(`|`)}]
|
|
2119
2124
|
-o, --output <file> Output file (default: - for stdout)
|
|
2120
2125
|
--top-n <n> Number of top entries to show (default: 20)
|
|
2121
2126
|
--cwd <path> Working directory for relative file paths in output
|
package/dist/index.d.mts
CHANGED
|
@@ -82,6 +82,8 @@ declare const defaultIsThirdPartyEntry: (entry: ProfileEntry) => boolean;
|
|
|
82
82
|
* - Node.js's [`pprof`](https://www.npmjs.com/package/pprof) npm package
|
|
83
83
|
* - Python's [`py-spy`](https://github.com/benfred/py-spy)
|
|
84
84
|
* - Rust's [`pprof-rs`](https://github.com/tikv/pprof-rs)
|
|
85
|
+
* - Java/Kotlin's [`async-profiler`](https://github.com/async-profiler/async-profiler)
|
|
86
|
+
* - C/C++'s [`gperftools`](https://github.com/gperftools/gperftools) (via `pprof --proto`)
|
|
85
87
|
*/
|
|
86
88
|
declare const pprofToMd: (data: Uint8Array, options?: ProfileToMdOptions) => string;
|
|
87
89
|
//#endregion
|
|
@@ -97,6 +99,8 @@ declare const pprofToMd: (data: Uint8Array, options?: ProfileToMdOptions) => str
|
|
|
97
99
|
* - [rbspy](https://rbspy.github.io) for Ruby
|
|
98
100
|
* - [py-spy](https://github.com/benfred/py-spy) for Python (`--format speedscope`)
|
|
99
101
|
* - [pprof-rs](https://github.com/tikv/pprof-rs) for Rust
|
|
102
|
+
* - [async-profiler](https://github.com/async-profiler/async-profiler) for Java/Kotlin (`-o speedscope`)
|
|
103
|
+
* - [phpspy](https://github.com/adsr/phpspy) for PHP (`--output-format=speedscope`)
|
|
100
104
|
*/
|
|
101
105
|
declare const speedscopeProfileToMd: (data: string | Uint8Array, options?: ProfileToMdOptions) => string;
|
|
102
106
|
//#endregion
|
|
@@ -151,6 +155,7 @@ declare const v8HeapProfileToMd: (data: string | Uint8Array, options?: ProfileTo
|
|
|
151
155
|
* function is undefined for invalid snapshots.
|
|
152
156
|
*
|
|
153
157
|
* You can generate a V8 heap snapshot in several ways:
|
|
158
|
+
* - [`node --heapsnapshot-near-heap-limit=1`](https://nodejs.org/api/cli.html#heapsnapshot-near-heap-limitmax-count)
|
|
154
159
|
* - [`node --heapsnapshot-signal`](https://nodejs.org/api/cli.html#--heapsnapshot-signalsignal)
|
|
155
160
|
* - [`bun --heap-prof`](https://bun.com/docs/project/benchmarking#heap-profiling)
|
|
156
161
|
* - [`v8.writeHeapSnapshot()`](https://nodejs.org/api/v8.html#v8writeheapsnapshotfilename)
|