profiler-md 0.3.0 → 0.4.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.
Files changed (38) hide show
  1. package/dist/cli/index.mjs +2607 -1927
  2. package/dist/index.d.mts +157 -219
  3. package/dist/index.js +2 -2
  4. package/docs/formats/collapsed.md +12 -0
  5. package/docs/languages/cpp.md +136 -0
  6. package/docs/languages/csharp.md +49 -0
  7. package/docs/languages/elixir.md +42 -0
  8. package/docs/languages/erlang.md +42 -0
  9. package/docs/languages/fsharp.md +49 -0
  10. package/docs/languages/java.md +10 -7
  11. package/docs/languages/javascript.md +35 -0
  12. package/docs/languages/julia.md +42 -0
  13. package/docs/languages/kotlin.md +120 -0
  14. package/docs/languages/python.md +10 -4
  15. package/docs/languages/typescript.md +254 -0
  16. package/examples/bun.cpuprofile.md +33 -33
  17. package/examples/deno.cpuprofile.md +9 -9
  18. package/examples/jsc-heap-snapshot.base.json.md +507 -0
  19. package/examples/jsc-heap-snapshot.current.json.md +504 -0
  20. package/examples/jsc-heap-snapshot.diff.json.md +119 -0
  21. package/examples/node.base.cpuprofile.md +451 -0
  22. package/examples/node.current.cpuprofile.md +449 -0
  23. package/examples/node.diff.cpuprofile.md +82 -0
  24. package/examples/node.heapprofile.md +33 -33
  25. package/examples/node.heapsnapshot.md +46 -46
  26. package/examples/node.pprof.md +3 -3
  27. package/examples/python.base.collapsed.md +116 -0
  28. package/examples/python.current.collapsed.md +125 -0
  29. package/examples/python.diff.collapsed.md +51 -0
  30. package/examples/{rust.pprof.md → rust.base.pprof.md} +199 -199
  31. package/examples/rust.current.pprof.md +480 -0
  32. package/examples/rust.diff.pprof.md +117 -0
  33. package/examples/webkit-timeline-recording.json.md +296 -296
  34. package/package.json +21 -18
  35. package/readme.md +106 -80
  36. package/examples/jsc-heap-snapshot.json.md +0 -509
  37. package/examples/node.cpuprofile.md +0 -485
  38. package/examples/node.speedscope.json.md +0 -408
@@ -0,0 +1,254 @@
1
+ # JavaScript
2
+
3
+ Profiling JavaScript works across Node.js, Deno, Bun, and Chrome via V8 CPU
4
+ profiles, V8 heap profiles, and V8 heap snapshots.
5
+
6
+ ## CPU profiling
7
+
8
+ Periodically samples the call stack. Useful for finding CPU hot spots.
9
+
10
+ ### CLI
11
+
12
+ ```sh
13
+ # Node.js
14
+ node --cpu-prof script.js
15
+
16
+ # Deno
17
+ deno run --cpu-prof script.ts
18
+
19
+ # Bun (output was incorrect before v1.3.13)
20
+ bun --cpu-prof script.ts
21
+ ```
22
+
23
+ #### Flags
24
+
25
+ | Flag | Default | Description |
26
+ | -------------------------- | ---------------------------------- | --------------------------------------------- |
27
+ | `--cpu-prof` | — | Write a CPU profile on exit; enabled when set |
28
+ | `--cpu-prof-interval=<µs>` | `1000` | Sampling interval in microseconds |
29
+ | `--cpu-prof-dir=<dir>` | `.` | Directory to write the profile to |
30
+ | `--cpu-prof-name=<name>` | `CPU.<timestamp>.<pid>.cpuprofile` | Filename for the profile |
31
+
32
+ ### Programmatic API
33
+
34
+ Profile a specific section of code rather than the whole process:
35
+
36
+ ```js
37
+ import { writeFileSync } from 'node:fs'
38
+ import { Session } from 'node:inspector/promises'
39
+
40
+ const session = new Session()
41
+ session.connect()
42
+ await session.post(`Profiler.enable`)
43
+ await session.post(`Profiler.setSamplingInterval`, { interval: 100 })
44
+ await session.post(`Profiler.start`)
45
+
46
+ // Code to profile...
47
+
48
+ const { profile } = await session.post(`Profiler.stop`)
49
+ writeFileSync(`cpu.cpuprofile`, JSON.stringify(profile))
50
+ ```
51
+
52
+ ## Memory profiling
53
+
54
+ Samples heap allocations by stack trace. Useful for finding allocation hot spots
55
+ and reducing GC pressure.
56
+
57
+ `bun --heap-prof` generates a heap _snapshot_ on exit, not a heap _profile_.
58
+ Deno has no equivalent.
59
+
60
+ ### CLI
61
+
62
+ ```sh
63
+ # Node.js
64
+ node --heap-prof script.js
65
+ ```
66
+
67
+ #### Flags
68
+
69
+ | Flag | Default | Description |
70
+ | ------------------------------ | -------- | ---------------------------------------------- |
71
+ | `--heap-prof` | — | Write a heap profile on exit; enabled when set |
72
+ | `--heap-prof-interval=<bytes>` | `524288` | Sampling interval in bytes (default 512 KB) |
73
+ | `--heap-prof-dir=<dir>` | `.` | Directory to write the profile to |
74
+ | `--heap-prof-name=<name>` | — | Filename for the profile |
75
+
76
+ ### Programmatic API
77
+
78
+ ```js
79
+ import { writeFileSync } from 'node:fs'
80
+ import { Session } from 'node:inspector/promises'
81
+
82
+ const session = new Session()
83
+ session.connect()
84
+ await session.post(`HeapProfiler.enable`)
85
+ await session.post(`HeapProfiler.startSamplingHeapProfiler`, {
86
+ samplingInterval: 524_288,
87
+ })
88
+
89
+ // Code to profile...
90
+
91
+ const { profile } = await session.post(`HeapProfiler.stopSamplingHeapProfiler`)
92
+ writeFileSync(`heap.heapprofile`, JSON.stringify(profile))
93
+ ```
94
+
95
+ ## Heap snapshots
96
+
97
+ Captures a snapshot of all live objects on the heap. Useful for diagnosing
98
+ memory leaks.
99
+
100
+ ### CLI
101
+
102
+ ```sh
103
+ # Trigger on OOM
104
+ node --heapsnapshot-near-heap-limit=1 script.js
105
+
106
+ # Trigger on signal
107
+ node --heapsnapshot-signal=USR2 script.js # then: kill -USR2 <pid>
108
+
109
+ # Bun (on exit)
110
+ bun --heap-prof script.ts
111
+ ```
112
+
113
+ #### Node.js flags
114
+
115
+ | Flag | Default | Description |
116
+ | ------------------------------------ | ------- | ---------------------------------------------------------- |
117
+ | `--heapsnapshot-near-heap-limit=<n>` | — | Write up to n snapshots when the heap approaches its limit |
118
+ | `--heapsnapshot-signal=<signal>` | — | Signal that triggers a snapshot on demand (e.g. `USR2`) |
119
+
120
+ #### Bun flags
121
+
122
+ | Flag | Default | Description |
123
+ | ------------------------- | ------- | ----------------------------------------------- |
124
+ | `--heap-prof` | — | Write a heap snapshot on exit; enabled when set |
125
+ | `--heap-prof-dir=<dir>` | `.` | Directory to write the snapshot to |
126
+ | `--heap-prof-name=<name>` | — | Filename for the snapshot |
127
+
128
+ ### Programmatic API
129
+
130
+ ```js
131
+ import { writeHeapSnapshot } from 'node:v8'
132
+
133
+ // Code to capture...
134
+ writeHeapSnapshot(`heap.heapsnapshot`)
135
+ ```
136
+
137
+ ## pprof
138
+
139
+ Node.js can also emit [pprof](https://github.com/google/pprof) profiles via the
140
+ [`@datadog/pprof`](https://www.npmjs.com/package/@datadog/pprof) package, which
141
+ profiles a section of code rather than the whole process.
142
+
143
+ ### CPU profiling
144
+
145
+ Samples wall-clock time across all threads. Useful for finding CPU hot spots and
146
+ time spent waiting.
147
+
148
+ ```js
149
+ import { writeFile } from 'node:fs/promises'
150
+ import { encode, time } from '@datadog/pprof'
151
+
152
+ const profile = await time.profile({ durationMillis: 10_000 })
153
+ await writeFile(`cpu.pb.gz`, await encode(profile))
154
+ ```
155
+
156
+ ### Memory profiling
157
+
158
+ Samples heap allocations by stack trace. Useful for finding allocation hot spots
159
+ and reducing GC pressure.
160
+
161
+ ```js
162
+ import { writeFile } from 'node:fs/promises'
163
+ import { encode, heap } from '@datadog/pprof'
164
+
165
+ heap.start(512 * 1024, 64) // Sampling interval in bytes, max stack depth
166
+
167
+ // Code to profile...
168
+
169
+ await writeFile(`heap.pb.gz`, await encode(await heap.profile()))
170
+ ```
171
+
172
+ ## Chrome DevTools
173
+
174
+ Chrome DevTools can profile JavaScript running in the browser or connected to
175
+ Node.js, Deno, or Bun via `--inspect`. The panels and workflow are the same in
176
+ both cases.
177
+
178
+ ### Connecting
179
+
180
+ **In the browser:** open DevTools with ⌥⌘I (macOS) or Ctrl+Shift+I
181
+ (Windows/Linux).
182
+
183
+ **Via `--inspect` (Node.js, Deno, Bun):** start the process with the inspector
184
+ enabled, then open `chrome://inspect` in Chrome and click **Open dedicated
185
+ DevTools for Node**. For Bun, open the URL printed to stderr in
186
+ [debug.bun.sh](https://debug.bun.sh) — Bun uses the WebKit Inspector Protocol
187
+ rather than V8's.
188
+
189
+ ```sh
190
+ # Node.js (default port 9229)
191
+ node --inspect script.js
192
+
193
+ # Deno (default port 9229)
194
+ deno run --inspect script.ts
195
+
196
+ # Bun (auto-assigned port)
197
+ bun --inspect script.ts
198
+ ```
199
+
200
+ #### Flags (all runtimes)
201
+
202
+ | Flag | Description |
203
+ | ------------------------------ | ----------------------------------------------------------- |
204
+ | `--inspect[=<host:port>]` | Start the inspector; code runs immediately |
205
+ | `--inspect-wait[=<host:port>]` | Wait for a debugger to attach before running |
206
+ | `--inspect-brk[=<host:port>]` | Wait for a debugger to attach, then break on the first line |
207
+
208
+ ### CPU profiling
209
+
210
+ Open the **Performance** panel and click **Record**. Stop recording when done.
211
+
212
+ ### Heap allocation profiling
213
+
214
+ Open the **Memory** panel, select **Allocation sampling**, and click **Start**.
215
+ Stop when done to see allocation hot spots by call stack.
216
+
217
+ ### Heap snapshots
218
+
219
+ Open the **Memory** panel, select **Heap snapshot**, and click **Take
220
+ snapshot**.
221
+
222
+ ## Safari Web Inspector
223
+
224
+ Safari's Web Inspector records a timeline that combines CPU sampling, browser
225
+ activity, and optionally memory readings and heap allocations, all exported as a
226
+ single file.
227
+
228
+ ### Connecting
229
+
230
+ Open the Web Inspector with **Develop → Show Web Inspector** (or ⌥⌘I).
231
+
232
+ ### Recording
233
+
234
+ 1. Click the **Timelines** tab.
235
+ 2. Enable the instruments you want: **JavaScript & Events** (always), and
236
+ optionally **Memory** and **JavaScript Allocations**.
237
+ 3. Click **Start Recording** (or ⌘R).
238
+ 4. Reproduce the scenario you want to profile.
239
+ 5. Click **Stop Recording**.
240
+ 6. Click the **Export** button (arrow icon) and save as a `.json` file.
241
+
242
+ ### Heap snapshots
243
+
244
+ Open the **Memory** panel, select **Heap Snapshot**, and click **Take
245
+ Snapshot**.
246
+
247
+ #### Programmatic API
248
+
249
+ `console.takeHeapSnapshot()` is a non-standard WebKit extension that takes a
250
+ heap snapshot from JavaScript and adds it to the **Memory** panel:
251
+
252
+ ```js
253
+ console.takeHeapSnapshot()
254
+ ```
@@ -19,22 +19,22 @@ Functions ranked by time spent directly in the function body, excluding callees.
19
19
  | % | Time | Samples | Function | Location |
20
20
  | ----: | ------: | ------: | ------------------------------------------- | --------------------------------------- |
21
21
  | 28.7% | 701.2ms | 4,402 | `unevalLiteral` | uneval/src/internal/primitive.ts:139:23 |
22
- | 11.5% | 281.3ms | 1,768 | `join` | `<native>` |
22
+ | 11.5% | 281.3ms | 1,768 | `join` | `<unknown>` |
23
23
  | 10.9% | 267.6ms | 1,667 | `traverseObject` | uneval/src/index.ts:204:26 |
24
24
  | 9.5% | 232.9ms | 1,454 | `unevalNumber` | uneval/src/internal/primitive.ts:12:29 |
25
- | 7.2% | 176.8ms | 1,111 | `getOwnPropertyDescriptor` | `<native>` |
25
+ | 7.2% | 176.8ms | 1,111 | `getOwnPropertyDescriptor` | `<unknown>` |
26
26
  | 4.8% | 116.4ms | 728 | `unevalObjectLiteralKey` | uneval/src/internal/object.ts:384:32 |
27
27
  | 4.5% | 109.6ms | 691 | `getType` | uneval/src/internal/type.ts:4:24 |
28
28
  | 3.0% | 72.5ms | 451 | `unevalArray` | uneval/src/internal/collection.ts:7:47 |
29
29
  | 2.9% | 70.6ms | 435 | `traverse` | uneval/src/index.ts:164:20 |
30
30
  | 2.8% | 68.3ms | 420 | `unevalObjectLike` | uneval/src/internal/object.ts:103:26 |
31
- | 2.2% | 54.8ms | 341 | `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` | `<native>` |
31
+ | 2.2% | 54.8ms | 341 | `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` | `<unknown>` |
32
32
  | 1.4% | 33.1ms | 204 | `unevalString` | uneval/src/internal/primitive.ts:133:29 |
33
33
  | 1.3% | 32.4ms | 183 | `createState` | uneval/src/index.ts:144:21 |
34
34
  | 1.3% | 32.1ms | 200 | `uneval` | uneval/src/index.ts:75:16 |
35
35
  | 1.2% | 28.3ms | 178 | `unevalBoolean` | uneval/src/internal/primitive.ts:8:30 |
36
- | 0.5% | 13.0ms | 80 | `push` | `<native>` |
37
- | 0.3% | 8.2ms | 46 | `map` | `<native>` |
36
+ | 0.5% | 13.0ms | 80 | `push` | `<unknown>` |
37
+ | 0.3% | 8.2ms | 46 | `map` | `<unknown>` |
38
38
  | 0.3% | 7.3ms | 47 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
39
39
  | 0.2% | 5.5ms | 35 | `unevalObjectInternal` | uneval/src/internal/object.ts:68:30 |
40
40
  | 0.2% | 4.1ms | 26 | `unevalObjectAssign` | uneval/src/internal/collection.ts:89:28 |
@@ -151,7 +151,7 @@ Lines ranked by contribution to each function's self time.
151
151
  | -----: | -----: | ------: | ----------------------------------- |
152
152
  | 100.0% | 28.3ms | 178 | uneval/src/internal/primitive.ts:10 |
153
153
 
154
- ##### `map` (`<native>`)
154
+ ##### `map` (`<unknown>`)
155
155
 
156
156
  | % | Time | Samples | Location |
157
157
  | -----: | ----: | ------: | -------- |
@@ -190,7 +190,7 @@ Callers ranked by contribution to each function's self time. Caller attribution
190
190
  | -----: | ------: | ------: | -------------- | --------------------------------------- |
191
191
  | 100.0% | 701.2ms | 4,402 | `unevalString` | uneval/src/internal/primitive.ts:133:29 |
192
192
 
193
- ##### `join` (`<native>`)
193
+ ##### `join` (`<unknown>`)
194
194
 
195
195
  | % | Time | Samples | Caller | Location |
196
196
  | ----: | ------: | ------: | ------------------ | -------------------------------------- |
@@ -212,7 +212,7 @@ Callers ranked by contribution to each function's self time. Caller attribution
212
212
  | 0.6% | 1.3ms | 8 | `unevalObjectLike` | uneval/src/internal/object.ts:103:26 |
213
213
  | 0.1% | 0.2ms | 1 | `traverse` | uneval/src/index.ts:164:20 |
214
214
 
215
- ##### `getOwnPropertyDescriptor` (`<native>`)
215
+ ##### `getOwnPropertyDescriptor` (`<unknown>`)
216
216
 
217
217
  | % | Time | Samples | Caller | Location |
218
218
  | ----: | ------: | ------: | ---------------- | -------------------------- |
@@ -254,7 +254,7 @@ Callers ranked by contribution to each function's self time. Caller attribution
254
254
  | 29.9% | 20.4ms | 122 | `unevalObjectLike` | uneval/src/internal/object.ts:103:26 |
255
255
  | 29.4% | 20.1ms | 125 | `unevalArray` | uneval/src/internal/collection.ts:7:47 |
256
256
 
257
- ##### `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` (`<native>`)
257
+ ##### `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` (`<unknown>`)
258
258
 
259
259
  | % | Time | Samples | Caller | Location |
260
260
  | -----: | -----: | ------: | ------------------------ | ------------------------------------ |
@@ -279,7 +279,7 @@ Callers ranked by contribution to each function's self time. Caller attribution
279
279
  | -----: | -----: | ------: | ---------------- | ---------------------------------- |
280
280
  | 100.0% | 28.3ms | 178 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
281
281
 
282
- ##### `push` (`<native>`)
282
+ ##### `push` (`<unknown>`)
283
283
 
284
284
  | % | Time | Samples | Caller | Location |
285
285
  | ----: | ----: | ------: | ------------------ | -------------------------------------- |
@@ -287,7 +287,7 @@ Callers ranked by contribution to each function's self time. Caller attribution
287
287
  | 2.6% | 0.3ms | 2 | `traverseObject` | uneval/src/index.ts:204:26 |
288
288
  | 1.3% | 0.2ms | 1 | `unevalObjectLike` | uneval/src/internal/object.ts:103:26 |
289
289
 
290
- ##### `map` (`<native>`)
290
+ ##### `map` (`<unknown>`)
291
291
 
292
292
  | % | Time | Samples | Caller | Location |
293
293
  | -----: | ----: | ------: | ------------------ | ------------------------------------ |
@@ -331,15 +331,15 @@ Functions ranked by total time spent in the function and all its callees.
331
331
  | 25.6% | 625.9ms | 3,912 | `traverse` | uneval/src/index.ts:164:20 |
332
332
  | 25.5% | 623.7ms | 3,908 | `unevalObjectLiteralKey` | uneval/src/internal/object.ts:384:32 |
333
333
  | 23.8% | 582.9ms | 3,650 | `traverseObject` | uneval/src/index.ts:204:26 |
334
- | 11.5% | 281.3ms | 1,768 | `join` | `<native>` |
334
+ | 11.5% | 281.3ms | 1,768 | `join` | `<unknown>` |
335
335
  | 9.5% | 232.9ms | 1,454 | `unevalNumber` | uneval/src/internal/primitive.ts:12:29 |
336
- | 7.2% | 176.8ms | 1,111 | `getOwnPropertyDescriptor` | `<native>` |
336
+ | 7.2% | 176.8ms | 1,111 | `getOwnPropertyDescriptor` | `<unknown>` |
337
337
  | 4.5% | 110.1ms | 694 | `getType` | uneval/src/internal/type.ts:4:24 |
338
- | 2.2% | 54.8ms | 341 | `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` | `<native>` |
338
+ | 2.2% | 54.8ms | 341 | `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` | `<unknown>` |
339
339
  | 1.2% | 28.3ms | 178 | `unevalBoolean` | uneval/src/internal/primitive.ts:8:30 |
340
- | 0.5% | 13.0ms | 80 | `push` | `<native>` |
340
+ | 0.5% | 13.0ms | 80 | `push` | `<unknown>` |
341
341
  | 0.4% | 8.6ms | 55 | `unevalObject` | uneval/src/internal/object.ts:20:29 |
342
- | 0.3% | 8.2ms | 46 | `map` | `<native>` |
342
+ | 0.3% | 8.2ms | 46 | `map` | `<unknown>` |
343
343
  | 0.2% | 5.5ms | 35 | `unevalObjectInternal` | uneval/src/internal/object.ts:68:30 |
344
344
 
345
345
  #### Callees
@@ -364,7 +364,7 @@ Callees ranked by contribution to each function's total time. Callee attribution
364
364
  | 25.1% | 322.7ms | 2,008 | `unevalObjectLike` | uneval/src/internal/object.ts:103:26 |
365
365
  | 19.8% | 254.1ms | 1,590 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
366
366
  | 16.7% | 214.8ms | 1,337 | `unevalArray` | uneval/src/internal/collection.ts:7:47 |
367
- | 13.5% | 173.9ms | 1,091 | `join` | `<native>` |
367
+ | 13.5% | 173.9ms | 1,091 | `join` | `<unknown>` |
368
368
 
369
369
  ##### `unevalInternal` (uneval/src/internal/index.ts:25:32)
370
370
 
@@ -382,8 +382,8 @@ Callees ranked by contribution to each function's total time. Callee attribution
382
382
  | 45.4% | 367.7ms | 2,300 | `unevalObjectLike` | uneval/src/internal/object.ts:103:26 |
383
383
  | 33.2% | 268.5ms | 1,684 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
384
384
  | 19.9% | 161.4ms | 1,006 | `unevalArray` | uneval/src/internal/collection.ts:7:47 |
385
- | 13.1% | 105.9ms | 668 | `join` | `<native>` |
386
- | 0.7% | 5.9ms | 36 | `push` | `<native>` |
385
+ | 13.1% | 105.9ms | 668 | `join` | `<unknown>` |
386
+ | 0.7% | 5.9ms | 36 | `push` | `<unknown>` |
387
387
 
388
388
  ##### `unevalString` (uneval/src/internal/primitive.ts:133:29)
389
389
 
@@ -393,11 +393,11 @@ Callees ranked by contribution to each function's total time. Callee attribution
393
393
 
394
394
  ##### `unevalLiteral` (uneval/src/internal/primitive.ts:139:23)
395
395
 
396
- | % | Time | Samples | Callee | Location |
397
- | ---: | ----: | ------: | ------------- | ---------- |
398
- | 0.0% | 0.2ms | 1 | `charCodeAt` | `<native>` |
399
- | 0.0% | 0.2ms | 1 | `(unknown)` | `<native>` |
400
- | 0.0% | 0.1ms | 1 | `toLowerCase` | `<native>` |
396
+ | % | Time | Samples | Callee | Location |
397
+ | ---: | ----: | ------: | ------------- | ----------- |
398
+ | 0.0% | 0.2ms | 1 | `charCodeAt` | `<unknown>` |
399
+ | 0.0% | 0.2ms | 1 | `(unknown)` | `<unknown>` |
400
+ | 0.0% | 0.1ms | 1 | `toLowerCase` | `<unknown>` |
401
401
 
402
402
  ##### `createState` (uneval/src/index.ts:144:21)
403
403
 
@@ -410,7 +410,7 @@ Callees ranked by contribution to each function's total time. Callee attribution
410
410
  | % | Time | Samples | Callee | Location |
411
411
  | ----: | ------: | ------: | -------------------------- | -------------------------------------- |
412
412
  | 93.1% | 582.9ms | 3,650 | `traverseObject` | uneval/src/index.ts:204:26 |
413
- | 0.1% | 0.5ms | 3 | `getOwnPropertyDescriptor` | `<native>` |
413
+ | 0.1% | 0.5ms | 3 | `getOwnPropertyDescriptor` | `<unknown>` |
414
414
  | 0.0% | 0.2ms | 1 | `unevalNumber` | uneval/src/internal/primitive.ts:12:29 |
415
415
  | 0.0% | 0.2ms | 1 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
416
416
 
@@ -419,7 +419,7 @@ Callees ranked by contribution to each function's total time. Callee attribution
419
419
  | % | Time | Samples | Callee | Location |
420
420
  | ----: | ------: | ------: | ------------------------------------------- | --------------------------------------- |
421
421
  | 72.5% | 452.4ms | 2,838 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
422
- | 8.8% | 54.8ms | 341 | `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` | `<native>` |
422
+ | 8.8% | 54.8ms | 341 | `/^[$_\p{ID_Start}][$_\p{ID_Continue}]*$/u` | `<unknown>` |
423
423
  | 0.0% | 0.1ms | 1 | `unevalString` | uneval/src/internal/primitive.ts:133:29 |
424
424
 
425
425
  ##### `traverseObject` (uneval/src/index.ts:204:26)
@@ -427,23 +427,23 @@ Callees ranked by contribution to each function's total time. Callee attribution
427
427
  | % | Time | Samples | Callee | Location |
428
428
  | ----: | ------: | ------: | -------------------------- | -------------------------------- |
429
429
  | 50.3% | 293.4ms | 1,842 | `traverse` | uneval/src/index.ts:164:20 |
430
- | 30.3% | 176.4ms | 1,108 | `getOwnPropertyDescriptor` | `<native>` |
430
+ | 30.3% | 176.4ms | 1,108 | `getOwnPropertyDescriptor` | `<unknown>` |
431
431
  | 18.9% | 110.1ms | 694 | `getType` | uneval/src/internal/type.ts:4:24 |
432
- | 0.1% | 0.3ms | 2 | `push` | `<native>` |
433
- | 0.0% | 0.1ms | 1 | `ownKeys` | `<native>` |
432
+ | 0.1% | 0.3ms | 2 | `push` | `<unknown>` |
433
+ | 0.0% | 0.1ms | 1 | `ownKeys` | `<unknown>` |
434
434
 
435
435
  ##### `getType` (uneval/src/internal/type.ts:4:24)
436
436
 
437
- | % | Time | Samples | Callee | Location |
438
- | ---: | ----: | ------: | ---------- | ---------- |
439
- | 0.4% | 0.5ms | 3 | `toString` | `<native>` |
437
+ | % | Time | Samples | Callee | Location |
438
+ | ---: | ----: | ------: | ---------- | ----------- |
439
+ | 0.4% | 0.5ms | 3 | `toString` | `<unknown>` |
440
440
 
441
441
  ##### `unevalObject` (uneval/src/internal/object.ts:20:29)
442
442
 
443
443
  | % | Time | Samples | Callee | Location |
444
444
  | ----: | ----: | ------: | ---------------------- | ----------------------------------- |
445
445
  | 61.6% | 5.3ms | 34 | `unevalObjectInternal` | uneval/src/internal/object.ts:68:30 |
446
- | 2.0% | 0.2ms | 1 | `get` | `<native>` |
446
+ | 2.0% | 0.2ms | 1 | `get` | `<unknown>` |
447
447
 
448
448
  ## Hottest call stacks
449
449
 
@@ -32,10 +32,10 @@ Functions ranked by time spent directly in the function body, excluding callees.
32
32
  | 3.4% | 205.2ms | 1,575 | `getType` | uneval/src/internal/type.ts:4:24 |
33
33
  | 2.9% | 175.5ms | 1,346 | `unevalObjectLiteralKey` | uneval/src/internal/object.ts:384:32 |
34
34
  | 2.5% | 151.0ms | 1,151 | `createState` | uneval/src/index.ts:144:21 |
35
- | 2.3% | 139.7ms | 1,060 | `(garbage collector)` | `<native>` |
36
- | 2.1% | 128.6ms | 983 | `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` | `<native>` |
37
- | 1.7% | 106.1ms | 817 | `(program)` | `<native>` |
38
- | 0.8% | 50.1ms | 38 | `(idle)` | `<native>` |
35
+ | 2.3% | 139.7ms | 1,060 | `(garbage collector)` | `<unknown>` |
36
+ | 2.1% | 128.6ms | 983 | `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` | `<unknown>` |
37
+ | 1.7% | 106.1ms | 817 | `(program)` | `<unknown>` |
38
+ | 0.8% | 50.1ms | 38 | `(idle)` | `<unknown>` |
39
39
  | 0.7% | 44.0ms | 338 | `unevalObject` | uneval/src/internal/object.ts:20:29 |
40
40
  | 0.7% | 40.3ms | 309 | `isObject` | uneval/src/internal/object.ts:434:25 |
41
41
  | 0.7% | 40.3ms | 308 | `unevalString` | uneval/src/internal/primitive.ts:133:29 |
@@ -284,7 +284,7 @@ Callers ranked by contribution to each function's self time. Caller attribution
284
284
  | -----: | ------: | ------: | -------- | ------------------------- |
285
285
  | 100.0% | 151.0ms | 1,151 | `uneval` | uneval/src/index.ts:75:16 |
286
286
 
287
- ##### `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` (`<native>`)
287
+ ##### `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` (`<unknown>`)
288
288
 
289
289
  | % | Time | Samples | Caller | Location |
290
290
  | -----: | ------: | ------: | ------------------------ | ------------------------------------ |
@@ -337,9 +337,9 @@ Functions ranked by total time spent in the function and all its callees.
337
337
  | 8.7% | 529.6ms | 4,061 | `unevalLiteral` | uneval/src/internal/primitive.ts:139:23 |
338
338
  | 6.9% | 420.6ms | 3,215 | `unevalNumber` | uneval/src/internal/primitive.ts:12:29 |
339
339
  | 3.4% | 205.2ms | 1,575 | `getType` | uneval/src/internal/type.ts:4:24 |
340
- | 2.3% | 139.7ms | 1,060 | `(garbage collector)` | `<native>` |
341
- | 2.1% | 128.6ms | 983 | `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` | `<native>` |
342
- | 1.7% | 106.1ms | 817 | `(program)` | `<native>` |
340
+ | 2.3% | 139.7ms | 1,060 | `(garbage collector)` | `<unknown>` |
341
+ | 2.1% | 128.6ms | 983 | `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` | `<unknown>` |
342
+ | 1.7% | 106.1ms | 817 | `(program)` | `<unknown>` |
343
343
  | 1.1% | 68.4ms | 515 | `sample` | uneval/node_modules/.pnpm/fast-check@4.6.0/node_modules/fast-check/lib/fast-check.js:2551:16 |
344
344
 
345
345
  #### Callees
@@ -436,7 +436,7 @@ Callees ranked by contribution to each function's total time. Callee attribution
436
436
  | % | Time | Samples | Callee | Location |
437
437
  | ----: | ------: | ------: | ------------------------------------------------ | ---------------------------------- |
438
438
  | 75.2% | 921.4ms | 7,064 | `unevalWithoutCustom` | uneval/src/internal/index.ts:14:37 |
439
- | 10.5% | 128.6ms | 983 | `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` | `<native>` |
439
+ | 10.5% | 128.6ms | 983 | `RegExp: ^[$_\p{ID_Start}][$_\p{ID_Continue}]*$` | `<unknown>` |
440
440
  | 0.0% | 0.1ms | 1 | `unevalInternal` | uneval/src/internal/index.ts:25:32 |
441
441
 
442
442
  ##### `unevalWithoutCustom` (uneval/src/internal/index.ts:14:37)