profiler-md 0.1.0 → 0.1.2
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 +201 -106
- package/dist/index.d.mts +17 -1
- package/dist/index.js +2 -2
- package/package.json +3 -2
- package/readme.md +24 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "profiler-md",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Tomer Aberbach",
|
|
6
6
|
"email": "tomer@aberba.ch",
|
|
@@ -67,7 +67,8 @@
|
|
|
67
67
|
"plur": "^6.0.0",
|
|
68
68
|
"pprof-format": "^2.2.1",
|
|
69
69
|
"pretty-bytes": "^7.1.0",
|
|
70
|
-
"pretty-ms": "^9.3.0"
|
|
70
|
+
"pretty-ms": "^9.3.0",
|
|
71
|
+
"source-map-js": "^1.2.1"
|
|
71
72
|
},
|
|
72
73
|
"devDependencies": {
|
|
73
74
|
"@fast-check/vitest": "^0.4.0",
|
package/readme.md
CHANGED
|
@@ -28,9 +28,15 @@
|
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
31
|
-
- **
|
|
31
|
+
- **Multi-format:** supports [pprof](https://github.com/google/pprof),
|
|
32
|
+
[Speedscope](https://github.com/jlfwong/speedscope),
|
|
33
|
+
[V8 CPU profiles](https://nodejs.org/api/cli.html#cpu-prof),
|
|
34
|
+
[V8 heap profiles](https://nodejs.org/api/cli.html#--heap-prof), and
|
|
35
|
+
[V8 heap snapshots](https://nodejs.org/api/cli.html#heapsnapshot-near-heap-limitmax-count)
|
|
36
|
+
- **Multi-language:** JS/TS via V8 formats (Node.js, Bun, Deno); Go, Python,
|
|
37
|
+
Rust, Java, and more via pprof and Speedscope
|
|
32
38
|
- **Configurable:** control the number of top entries shown, working directory
|
|
33
|
-
for relative paths,
|
|
39
|
+
for relative paths, third-party detection, and entry filtering
|
|
34
40
|
- **CLI and API:** usable on the command-line or programmatically
|
|
35
41
|
|
|
36
42
|
## Install
|
|
@@ -54,12 +60,14 @@ $ profiler-md --help
|
|
|
54
60
|
|
|
55
61
|
Options:
|
|
56
62
|
-t, --type <type> Profile type, auto-detected from content if omitted
|
|
57
|
-
[speedscope|v8-cpu-profile|v8-heap-profile|v8-heap-snapshot
|
|
63
|
+
[pprof|speedscope|v8-cpu-profile|v8-heap-profile|v8-heap-snapshot]
|
|
58
64
|
-o, --output <file> Output file (default: - for stdout)
|
|
59
65
|
--top-n <n> Number of top entries to show (default: 20)
|
|
60
66
|
--cwd <path> Working directory for relative file paths in output
|
|
61
67
|
--third-party <glob> Mark URLs matching this glob as third-party
|
|
62
68
|
(repeatable; default: node_modules)
|
|
69
|
+
--source-maps <glob> Apply source maps matching this glob to profile
|
|
70
|
+
locations (repeatable)
|
|
63
71
|
--help Show this help message
|
|
64
72
|
```
|
|
65
73
|
|
|
@@ -114,6 +122,19 @@ console.log(v8HeapProfileToMd(v8HeapProfileData, options))
|
|
|
114
122
|
console.log(v8HeapSnapshotToMd(v8HeapSnapshotData, options))
|
|
115
123
|
```
|
|
116
124
|
|
|
125
|
+
## Skills
|
|
126
|
+
|
|
127
|
+
Use this `profiler-md` skill to have an agent profile and optimize your code:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
$ npx skills add TomerAberbach/profiler-md --skill profile-optimize
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
See [skills.sh](https://skills.sh/docs) for more info.
|
|
134
|
+
|
|
135
|
+
Fun fact: the skill has been used to profile and optimize `profiler-md` using
|
|
136
|
+
itself!
|
|
137
|
+
|
|
117
138
|
## Contributing
|
|
118
139
|
|
|
119
140
|
Stars are always welcome!
|