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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profiler-md",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "author": {
5
5
  "name": "Tomer Aberbach",
6
6
  "email": "tomer@aberba.ch",
@@ -43,7 +43,9 @@
43
43
  },
44
44
  "license": "MIT",
45
45
  "files": [
46
- "dist"
46
+ "examples",
47
+ "dist",
48
+ "docs"
47
49
  ],
48
50
  "type": "module",
49
51
  "sideEffects": false,
@@ -51,7 +53,7 @@
51
53
  "node": ">= 22"
52
54
  },
53
55
  "bin": {
54
- "profiler-md": "./dist/cli.mjs"
56
+ "profiler-md": "./dist/cli/index.mjs"
55
57
  },
56
58
  "exports": {
57
59
  ".": {
@@ -62,6 +64,11 @@
62
64
  },
63
65
  "prettier": "@tomer/prettier-config",
64
66
  "dependencies": {
67
+ "@shikijs/core": "^4.0.2",
68
+ "@shikijs/engine-oniguruma": "^4.0.2",
69
+ "@shikijs/langs": "^4.0.2",
70
+ "@shikijs/themes": "^4.0.2",
71
+ "ansis": "^4.2.0",
65
72
  "convert-source-map": "^2.0.0",
66
73
  "meow": "^14.1.0",
67
74
  "picomatch": "^4.0.4",
package/readme.md CHANGED
@@ -39,6 +39,23 @@
39
39
  for relative paths, third-party detection, and entry filtering
40
40
  - **CLI and API:** usable on the command-line or programmatically
41
41
 
42
+ ## Languages and formats
43
+
44
+ <!-- LANGUAGE_MATRIX START -->
45
+
46
+ | Language | Formats |
47
+ | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
48
+ | [C](docs/languages/c.md)/[C++](docs/languages/cpp.md) | [pprof](docs/formats/pprof.md) |
49
+ | [Go](docs/languages/go.md) | [pprof](docs/formats/pprof.md) |
50
+ | [Java](docs/languages/java.md)/[Kotlin](docs/languages/kotlin.md) | [pprof](docs/formats/pprof.md), [Speedscope](docs/formats/speedscope.md) |
51
+ | [JavaScript](docs/languages/javascript.md)/[TypeScript](docs/languages/typescript.md) | [V8 CPU profile](docs/formats/v8-cpu-profile.md) (examples: [Node.js](examples/node.cpuprofile.md), [Deno](examples/deno.cpuprofile.md), [Bun](examples/bun.cpuprofile.md)), [V8 heap profile](docs/formats/v8-heap-profile.md) (examples: [Node.js](examples/node.heapprofile.md)), [V8 heap snapshot](docs/formats/v8-heap-snapshot.md) (examples: [Node.js](examples/node.heapsnapshot.md)), [pprof](docs/formats/pprof.md) (examples: [Node.js](examples/node.pprof.md)), [Speedscope](docs/formats/speedscope.md) (examples: [Node.js](examples/node.speedscope.json.md)) |
52
+ | [PHP](docs/languages/php.md) | [Speedscope](docs/formats/speedscope.md) |
53
+ | [Python](docs/languages/python.md) | [pprof](docs/formats/pprof.md), [Speedscope](docs/formats/speedscope.md) |
54
+ | [Ruby](docs/languages/ruby.md) | [Speedscope](docs/formats/speedscope.md) |
55
+ | [Rust](docs/languages/rust.md) | [pprof](docs/formats/pprof.md) (examples: [1](examples/rust1.pprof.md), [2](examples/rust2.pprof.md)), [Speedscope](docs/formats/speedscope.md) |
56
+
57
+ <!-- LANGUAGE_MATRIX END -->
58
+
42
59
  ## Install
43
60
 
44
61
  ```sh
@@ -57,10 +74,10 @@ $ profiler-md --help
57
74
  Converts performance profiles to human and LLM friendly Markdown.
58
75
 
59
76
  Usage: profiler-md [options] [file]
77
+ profiler-md --help [format|language]
60
78
 
61
79
  Options:
62
- -t, --type <type> Profile type, auto-detected from content if omitted
63
- [pprof|speedscope|v8-cpu-profile|v8-heap-profile|v8-heap-snapshot]
80
+ -f, --format <format> Profile format, auto-detected from content if omitted
64
81
  -o, --output <file> Output file (default: - for stdout)
65
82
  --top-n <n> Number of top entries to show (default: 20)
66
83
  --cwd <path> Working directory for relative file paths in output
@@ -69,7 +86,15 @@ $ profiler-md --help
69
86
  --source-maps <glob> Apply source maps matching this glob to profile
70
87
  locations; files may be source map JSON or contain
71
88
  inline source map comments (repeatable)
72
- --help Show this help message
89
+ --no-pager Disable paging of stdout output (default: paged when
90
+ stdout is a TTY, using $PAGER or less)
91
+ --color, --no-color Force-enable or force-disable ANSI syntax highlighting
92
+ (default: auto, on when stdout is a TTY; honors
93
+ NO_COLOR and FORCE_COLOR)
94
+ --help [format|language] Show this help message or topic docs
95
+
96
+ Formats: speedscope, v8-cpu-profile, v8-heap-profile, v8-heap-snapshot, pprof
97
+ Languages: c, cpp, go, java, kotlin, javascript, typescript, php, python, ruby, rust
73
98
  ```
74
99
 
75
100
  <!-- CLI_HELP END -->