v8-profiler-next
                                
                                
                                
                                    v8-profiler-next copied to clipboard
                            
                            
                            
                        Empty cpu profile in chrome devtool
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
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!
Same problem. Just use Chrome with older version, the profile displays well on version 101 base on my test.