Skip to content

Instantly share code, notes, and snippets.

@bgrins
Created October 28, 2024 17:13
Show Gist options
  • Save bgrins/d235a678b575a0169f9ff70a1683a0ef to your computer and use it in GitHub Desktop.
Save bgrins/d235a678b575a0169f9ff70a1683a0ef to your computer and use it in GitHub Desktop.
(async () => {
const settings = {
features: ['js', 'stackwalk', 'threads', 'leaf', 'tracer'],
threads: ["GeckoMain"],
};
await Services.profiler.StartProfiler(
settings.entries,
settings.interval,
settings.features,
settings.threads
);
await new Promise(r => setTimeout(r, 3000));
let data = await Services.profiler.getProfileDataAsync();
Services.profiler.StopProfiler();
console.log(data);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment