This is an automated Firefox profiler. It will visit the pages you specify and record data produced by Firefox profiler's JS Tracer feature.
Before installing this repo, make sure you have the following prerequisites:
- Linux or MacOS. Windows is not supported.
- You need at least Node v22.5.0 as this project depends on
node:sqlite
library. - You need a specific Firefox build. Specifically a build that has this patch stack. Make sure to check "Stack" tab to ensure this is indeed the latest patch in the stack. You can also download a build from here but it may be outdated.
- Clone this repository
- Run
npm install
- Rename
example.user.config.js
touser.config.js
and fill in the necessary fields.firefoxPath
: Path to the Firefox binary you want to use.jobs
: Websites you want to profile. See types > ProfileJob and example config for its structure.
- Run
npm run esbuild
- Run
npm start
This should open Firefox and start profiling the websites you specified in user.config.json
. Do note that writes to the database are done in every 10 profiles, so you won't see any data in the database until 10 profiles have been completed. You can configure this by modifying Pipeline Class > CHUNK_SIZE
DOM events: refers to the events recorded by the JS Tracer feature.
- Bot detection: While I haven't ran into any issues, as this is an automated Firefox instance, you may run into bot detection issues on some websites.
- Stacks with no JS: Sometimes the profiler records DOM events with no JS stack. What I mean by this is, usually a DOM event is triggered by a JS function. However, sometimes the profiler records a DOM event with no JS stack. This is a limitation of the profiler and not this tool. It sometimes happens when the JS code is running in a script tag in a document at the top-level scope. These calls are not reflected to the analysis as we can't match them to a specific window.