Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
ba26f7b
Add "drop samples with category" transform
canova Apr 10, 2026
69eab04
Add utilities for summarizing CPU usage timelines in a textual form.
mstange Jul 26, 2025
1cb7562
Create a profile-query library and a profile-query-cli script.
mstange Jul 26, 2025
4f90029
Do not run profile-query-cli tests in `yarn test`
canova Feb 23, 2026
c3e534c
Ignore the cli dist directory in eslint and prettier
canova Feb 23, 2026
ae50e4e
Add a --guide flag to pq
canova Mar 11, 2026
e321e48
Kill the daemon processes during the test cleanup
canova Mar 13, 2026
b33ecd1
Implement `pq profile info --all`
canova Mar 13, 2026
b910bf2
Implement `pq profile info --search`
canova Mar 13, 2026
280a417
Add tid to the thread info
canova Mar 13, 2026
08afe74
Make sure to mention that step 2 is required in the guide.
canova Mar 16, 2026
ed53dc2
Show time values relative to the root in `pq marker info`
canova Mar 16, 2026
8f9b067
Show relative timestamp value in stack information too
canova Mar 16, 2026
4a8a196
Experimental Windows support
canova Mar 16, 2026
140aaa1
Change the pq directory structure
canova Apr 9, 2026
0ed3501
Improve collection of thread samples
canova Apr 10, 2026
2405a93
Properly stop the old daemon if there is a hash mismatch
canova Apr 10, 2026
05e01b1
Error on session id clash
canova Apr 10, 2026
f5dac05
Numeric cli arguments should treat 0 as a real value
canova Apr 10, 2026
b6ce298
Drop idle samples by default and add a --incude-idle flag for includi…
canova Apr 10, 2026
69d87ab
Add sample filtering and update guide/help texts
canova Apr 10, 2026
7bb5539
Make function handles persistent across sessions by using IndexIntoFu…
canova Apr 11, 2026
3dd3311
Update filter-samples transform to include more filtering options
canova Apr 11, 2026
5b634c3
Add ephemeral and sticky filters for samples
canova Apr 11, 2026
cf7c37c
Mention --session in the guide
canova Apr 11, 2026
5530690
Initialize thread handles during the profile load
canova Apr 11, 2026
e0c2cde
Test cleanup and add some tests
canova Apr 11, 2026
282610a
Run the cli tests in CI
canova Apr 11, 2026
6cf51bd
Add test:cli to the fix commands
canova Apr 12, 2026
9075b28
Fix windows cli tests
canova Apr 12, 2026
4c5eda3
Update readmes
canova Apr 12, 2026
7007075
Rework session commands
canova Apr 12, 2026
60a187f
Switch to commander from minimist
canova Apr 12, 2026
42118c5
Guide updates
canova Apr 13, 2026
4959f50
Add tests for marker-info formatter
canova Apr 13, 2026
5f9b678
Update the --search documentation to prevent pitfalls
canova Apr 13, 2026
4010287
Prevent pq zoom unit pitfalls
canova Apr 13, 2026
0ff45bb
Add --top-n to marker filtering options
canova Apr 13, 2026
e0e1a1d
Mention the pq zoom <marker-handle> option in the command output
canova Apr 13, 2026
6cdbcf7
Rename pq to profiler-cli
canova Apr 14, 2026
1760740
Rename the directory to profiler-cli
canova Apr 14, 2026
17ec59a
Move implementation related things out of README.md of the cli
canova Apr 14, 2026
4bd1c12
Update package.json and license of cli
canova Apr 14, 2026
9ae98a8
Update naming
canova Apr 14, 2026
6eeda9a
Trim the guide
canova Apr 14, 2026
e367f25
Add 'profiler-cli thread network' command
canova Apr 14, 2026
7173ac2
Add etld+1 to profile info
canova Apr 14, 2026
e6a1832
Add a `profiler-cli function annotate` command to show source and asm
canova Apr 14, 2026
30c27d8
Also add pq as a binary so both pq and profiler-cli can be used
canova Apr 15, 2026
d0e3629
Make regex or usage clearer in the guide
canova Apr 15, 2026
78549a5
Add `profiler-cli profile logs`
canova Apr 15, 2026
1a3a7b8
Convert profiler-cli version to alpha
canova Apr 15, 2026
ceee8f3
Update the cli readme
canova Apr 15, 2026
51bc463
Improve the unknown command handling
canova Apr 15, 2026
6b4c906
Add `profiler-cli thread page-load` for page load analysis
canova Apr 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ jobs:
with:
fail_ci_if_error: false

cli-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js and install dependencies
uses: ./.github/actions/setup-node-and-install

- name: Run CLI tests
run: yarn test-cli

build-prod:
runs-on: ${{ matrix.os }}
strategy:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ webpack.local-config.js
*.orig
*.rej
.idea/
.profiler-cli-dev/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
src/profile-logic/import/proto
src/types/libdef/npm
profiler-cli/dist
docs-user/js
docs-user/css
src/test/fixtures/upgrades
Expand Down
1 change: 1 addition & 0 deletions bin/output-fixing-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const fixingCommands = {
'lint-css': 'lint-fix-css',
'prettier-run': 'prettier-fix',
test: 'test -u',
'test-cli': 'test-cli -u',
};

const command = process.argv.slice(2);
Expand Down
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig(
ignores: [
'src/profile-logic/import/proto/**',
'src/types/libdef/npm/**',
'profiler-cli/dist/**',
'res/**',
'dist/**',
'docs-user/**',
Expand Down Expand Up @@ -247,7 +248,7 @@ export default defineConfig(

// Test files override
{
files: ['src/test/**/*'],
files: ['src/test/**/*', 'profiler-cli/src/test/**/*'],
languageOptions: {
globals: {
...globals.jest,
Expand Down
69 changes: 55 additions & 14 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,14 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

module.exports = {
testMatch: ['<rootDir>/src/**/*.test.{js,jsx,ts,tsx}'],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],

// Use custom resolver that respects the "browser" field in package.json
resolver: './jest-resolver.js',

// Shared config for projects that need a browser-like (jsdom) environment.
// CLI unit tests use the same environment because they import browser-side
// fixtures to construct profile data.
const browserEnvConfig = {
testEnvironment: './src/test/custom-environment',
setupFilesAfterEnv: ['jest-extended/all', './src/test/setup.ts'],

collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!src/types/libdef/**',
],
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
resolver: './jest-resolver.js',

transform: {
'\\.([jt]sx?|mjs)$': 'babel-jest',
Expand All @@ -43,5 +36,53 @@ module.exports = {
escapeString: true,
printBasicPrototype: true,
},
verbose: false,
};

module.exports = {
projects: [
// ========================================================================
// Browser Tests (React/browser environment)
// ========================================================================
{
...browserEnvConfig,
displayName: 'browser',
testMatch: ['<rootDir>/src/**/*.test.{js,jsx,ts,tsx}'],

collectCoverageFrom: [
'src/**/*.{js,jsx,ts,tsx}',
'!**/node_modules/**',
'!src/types/libdef/**',
],
},

// ========================================================================
// CLI Unit Tests (browser/jsdom environment - imports browser-side fixtures)
// ========================================================================
{
...browserEnvConfig,
displayName: 'cli',
testMatch: ['<rootDir>/profiler-cli/src/test/unit/**/*.test.ts'],
},

// ========================================================================
// CLI Integration Tests (Node.js environment - spawns real processes)
// ========================================================================
{
displayName: 'cli-integration',
testMatch: ['<rootDir>/profiler-cli/src/test/integration/**/*.test.ts'],

testEnvironment: 'node',

setupFilesAfterEnv: ['./profiler-cli/src/test/integration/setup.ts'],

// Integration tests can be slow (loading profiles, spawning processes)
testTimeout: 30000,

moduleFileExtensions: ['ts', 'js'],

transform: {
'\\.([jt]sx?|mjs)$': 'babel-jest',
},
},
],
};
14 changes: 14 additions & 0 deletions locales/en-US/app.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,15 @@ CallNodeContextMenu--transform-focus-category = Focus on category <strong>{ $cat
.title =
Focusing on the nodes that belong to the same category as the selected node,
thereby merging all nodes that belong to another category.

# This is used as the context menu item to apply the "Drop category" transform.
# Variables:
# $categoryName (String) - Name of the category to drop.
CallNodeContextMenu--transform-drop-category = Drop samples with category <strong>{ $categoryName }</strong>
.title =
Dropping samples with a category removes all samples whose leaf frame
belongs to that category.

CallNodeContextMenu--transform-collapse-function-subtree = Collapse function
.title =
Collapsing a function will remove everything it called, and assign
Expand Down Expand Up @@ -1180,6 +1189,11 @@ TransformNavigator--focus-self = Focus Self: { $item }
# $item (String) - Name of the category that transform applied to.
TransformNavigator--focus-category = Focus category: { $item }

# "Drop samples with category" transform (drop is a verb, as in remove).
# Variables:
# $item (String) - Name of the category that transform applied to.
TransformNavigator--drop-category = Drop samples with category: { $item }

# "Merge call node" transform.
# See: https://profiler.firefox.com/docs/#/./guide-filtering-call-trees?id=merge
# Variables:
Expand Down
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"build-symbolicator-cli": "cross-env NODE_ENV=production node scripts/build-symbolicator.mjs",
"build-prod:quiet": "yarn build-prod",
"build-symbolicator-cli:quiet": "yarn build-symbolicator-cli",
"build-profile-query": "cross-env NODE_ENV=production node scripts/build-profile-query.mjs",
"build-profile-query:quiet": "yarn build-profile-query",
"build-profiler-cli": "cross-env NODE_ENV=production node scripts/build-profiler-cli.mjs",
"lint": "node bin/output-fixing-commands.js run-p lint-js lint-css prettier-run",
"lint-fix": "run-p lint-fix-js lint-fix-css prettier-fix",
"lint-js": "node bin/output-fixing-commands.js eslint . --report-unused-disable-directives --cache --cache-strategy content",
Expand All @@ -43,15 +46,16 @@
"start-examples": "ws -d examples/ -s index.html -p 4244",
"start-docs": "ws -d docs-user/ -p 3000",
"start-photon": "node scripts/run-photon-dev-server.mjs",
"test": "node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test jest",
"test": "node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test jest --selectProjects=browser",
"test-node": "node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test JEST_ENVIRONMENT=node jest",
"test-all": "run-p --max-parallel 4 ts license-check lint test test-alex test-lockfile",
"test-all": "run-p --max-parallel 4 ts license-check lint test test-alex test-lockfile && yarn test-cli",
"test-build-coverage": "yarn test --coverage --coverageReporters=html",
"test-serve-coverage": "ws -d coverage/ -p 4343",
"test-coverage": "run-s test-build-coverage test-serve-coverage",
"test-alex": "alex ./docs-* CODE_OF_CONDUCT.md CONTRIBUTING.md README.md",
"test-lockfile": "lockfile-lint --path yarn.lock --allowed-hosts yarn --validate-https",
"test-debug": "cross-env LC_ALL=C TZ=UTC NODE_ENV=test node --inspect-brk node_modules/.bin/jest --runInBand",
"test-cli": "yarn build-profiler-cli && node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test jest --selectProjects=cli cli-integration",
"postinstall": "patch-package"
},
"license": "MPL-2.0",
Expand Down Expand Up @@ -88,6 +92,7 @@
"long": "^5.3.2",
"memoize-immutable": "^3.0.0",
"memoize-one": "^6.0.0",
"commander": "14.0.3",
"minimist": "^1.2.8",
"mixedtuplemap": "^1.0.0",
"namedtuplemap": "^1.0.0",
Expand Down
Loading
Loading