-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Add support for capturing cpu profiles into tsc itself #33586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cfd43d4
to
5059b0d
Compare
|
||
const commandLine = parseCommandLine(args); | ||
|
||
if (commandLine.options.generateCpuProfile && sys.enableCPUProfiler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error host doesn't support option if !sys.enableCPUProfiler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it? It's essentially just a diagnostics flag.
…prise people, add inspector to browser field
Approved by @rbuckton offline ❤️ |
@DanielRosenwasser should we just document this on the wiki, like |
This way people can pretty easily capture a trace of their compilation just by passing
--generateCpuProfile profile.cpuprofile
alongside their existing compiler options. This essentially means that if you previously could send usextendedDiagnostics
, this allows you to (probably) send us a cpuprofile.This is implemented using
node
's builtininspector
library.