@firefox-devtools/profiler-cli 0.9.0 → 0.11.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/README.md CHANGED
@@ -30,22 +30,26 @@ Run `profiler-cli --help` for the full options reference.
30
30
 
31
31
  ```bash
32
32
  profiler-cli load <PATH> # Start daemon and load profile (file or http/https URL)
33
+ profiler-cli load <PATH> --with-samply # Same, but serve the file via "samply load" and symbolicate with its symbol server
33
34
  profiler-cli profile info # Print profile summary [--all] [--search <term>]
34
35
  profiler-cli profile meta # Print profile metadata (application, platform, recording settings)
35
36
  profiler-cli profile logs # Print Log markers in MOZ_LOG format [--thread] [--module] [--level] [--search] [--limit]
37
+ profiler-cli profile markers # Search markers across all threads [--search] [--thread] [--category] [--min-duration] [--max-duration] [--has-stack] [--limit]
38
+ profiler-cli profile save <path> # Save the loaded profile to a file or directory [--force]
39
+ profiler-cli thread list # List all threads as a flat table [--sort] [--search] [--limit]
36
40
  profiler-cli thread info # Print detailed thread information
37
41
  profiler-cli thread select <handle> # Select a thread (e.g., t-0, t-1)
38
- profiler-cli thread samples # Show hot functions list for current thread
42
+ profiler-cli thread samples # Show hot functions list and category breakdown for current thread
39
43
  profiler-cli thread samples-top-down # Show top-down call tree (where CPU time is spent)
40
44
  profiler-cli thread samples-bottom-up # Show bottom-up call tree (what calls hot functions)
41
45
  profiler-cli thread markers # List markers with aggregated statistics [--list for flat per-marker view]
42
46
  profiler-cli thread functions # List all functions with CPU percentages
43
47
  profiler-cli thread network # Show network requests with timing phases [--search] [--min-duration] [--max-duration] [--limit] [--sort]
44
48
  profiler-cli thread page-load # Show page load summary (navigation timing, resources, CPU, jank)
45
- profiler-cli marker info <handle> # Show detailed marker information (e.g., m-1234)
49
+ profiler-cli marker info <handle>... # Show detailed marker information; accepts several handles and ranges (e.g., m-1234, m-1234..m-1240)
46
50
  profiler-cli marker stack <handle> # Show full stack trace for a marker
47
51
  profiler-cli function expand <handle> # Show full untruncated function name (e.g., f-123)
48
- profiler-cli function info <handle> # Show detailed function information
52
+ profiler-cli function info <handle> # Show detailed function information and category breakdown
49
53
  profiler-cli function annotate <handle> # Show annotated source/assembly with timing data [--mode src|asm|all] [--context 2|file|N] [--symbol-server <url>]
50
54
  profiler-cli zoom push <range> # Push a zoom range (e.g., 2.7,3.1 or ts-g,ts-G or m-158)
51
55
  profiler-cli zoom pop # Pop the most recent zoom range
@@ -57,6 +61,7 @@ profiler-cli filter clear # Remove all filters for current thre
57
61
  profiler-cli sourcemap sources # List bundle sources eligible for a source map (src-N handles)
58
62
  profiler-cli sourcemap apply <path> # Apply a .map file to de-minify JS stacks [--to <src-N>]
59
63
  profiler-cli status # Show session status (selected thread, zoom ranges, filters)
64
+ profiler-cli permalink # Print a profiler.firefox.com URL for the current view [--short]
60
65
  profiler-cli stop # Stop current daemon
61
66
  profiler-cli stop <id> # Stop a specific session
62
67
  profiler-cli stop --all # Stop all sessions
@@ -64,6 +69,25 @@ profiler-cli session list # List all running daemon sessions (*
64
69
  profiler-cli session use <id> # Switch the current session
65
70
  ```
66
71
 
72
+ ### Symbolicating with samply
73
+
74
+ Some profiles are not symbolicated yet when they are saved, for example those
75
+ recorded with `samply record --save-only`, and symbolication as well as the
76
+ assembly view then need a symbol server that can see the local binaries.
77
+ `--with-samply` runs `samply load` in the background for the lifetime of the
78
+ session to provide that server:
79
+
80
+ ```bash
81
+ samply record --save-only -o profile.json ./my-program
82
+ profiler-cli load profile.json --with-samply
83
+ profiler-cli function annotate f-12 --mode asm
84
+ ```
85
+
86
+ samply is resolved from `PROFILER_CLI_SAMPLY_PATH` if set, then `PATH`, then
87
+ `$MOZBUILD_STATE_PATH/samply` (default `~/.mozbuild/samply`), where
88
+ `./mach bootstrap` installs it. The samply process is stopped together with the
89
+ session.
90
+
67
91
  ### Multiple sessions
68
92
 
69
93
  ```bash
@@ -97,6 +121,8 @@ profiler-cli thread info --thread t-0 # View info for specific thread witho
97
121
  | `--all` | Show all threads in `profile info` (overrides default top-5 limit) |
98
122
  | `--to <src-N>` | Target source for `sourcemap apply`, skipping auto-matching (from `sourcemap sources`) |
99
123
  | `--session <id>` | Use a specific session instead of the current one |
124
+ | `--permalink` | Also print a profiler.firefox.com URL for the view the command shows (published profiles only) |
125
+ | `--short-permalink` | Like `--permalink`, shortened through share.firefox.dev |
100
126
 
101
127
  ## Sample Filter Flags
102
128