You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to generate a cpu profile using the example here and it outputedt a cpu profile roughly 1.3MB in size but for some reason the cpu profile seems to be empty in chrome devtools
import * as fs from 'fs';
import * as v8Profiler from 'v8-profiler-next';
v8Profiler.setGenerateType(1);
const title = 'checkboxgroup';
describe('CheckboxGroup', () => {
v8Profiler.startProfiling(title, true);
afterAll(() => {
const profile = v8Profiler.stopProfiling(title);
profile.export(function (error, result: any) {
// if it doesn't have the extension .cpuprofile then
// chrome's profiler tool won't like it.
// examine the profile:
// Navigate to chrome://inspect
// Click Open dedicated DevTools for Node
// Select the profiler tab
// Load your file
fs.writeFileSync(`${title}.cpuprofile`, result);
profile.delete();
});
});
// tests...
it('should...')
});
These are the versions that I am using
Chrome: Version 123.0.6312.107 (Official Build) (x86_64)
v8-profiler-next: 1.10.0
Is there something wrong that I am doing here? Thanks in advance!
The text was updated successfully, but these errors were encountered:
I tried to generate a cpu profile using the example here and it outputedt a cpu profile roughly 1.3MB in size but for some reason the cpu profile seems to be empty in chrome devtools
CPU profile: checkboxgroup.cpuprofile
This is how I instrumented the profiler
These are the versions that I am using
Is there something wrong that I am doing here? Thanks in advance!
The text was updated successfully, but these errors were encountered: