Skip to content

Writes .har & .cpuprofile and combines them into a .json file suitable for Performance tab of Chrome DevTools

License

Notifications You must be signed in to change notification settings

anseal/node-profilers-combo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-profilers-combo

Writes .har & .cpuprofile and combines them into a .json file suitable for Performance tab of Chrome DevTools

Usage

import { ProfilersCombo } from 'node-profilers-combo'

const combo = new ProfilersCombo()

...

await combo.start()

... // some code to profile

const { cpuprofile, har, perf } = await combo.stop(`path/filename`)
// 3 files will be created 'filename.cpuprofile', 'filename.har', 'filename.json'
// No need to `await` for `stop()` if you don't care about returned results
// (And at the moment you probably shouldn't, because the returned `cpuprofile` is mutated a little bit, will fix later)

About

Writes .har & .cpuprofile and combines them into a .json file suitable for Performance tab of Chrome DevTools

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published