Add support for capturing cpu profiles into tsc itself (#33586)

* Add support for capturing cpu profiles into tsc itself

* Accept baseline for new compiler option in showConfig

* Fix lints

* Support profiling build mode, only ever have one live profiling session

* Minor modification to enable/disable semaphore, accept re-cased baseline

* Add pid into autognerated cpuprofile path

* Rename to fix case

* Sanitize filepaths in emitted cpuprofile for easier adoption by enterprise people, add inspector to browser field
This commit is contained in:
Wesley Wigham
2019-09-27 13:34:44 -07:00
committed by GitHub
parent 8d7fd2e691
commit 558ece72cb
8 changed files with 148 additions and 16 deletions

View File

@@ -141,6 +141,14 @@ namespace ts {
category: Diagnostics.Advanced_Options,
description: Diagnostics.Show_verbose_diagnostic_information
},
{
name: "generateCpuProfile",
type: "string",
isFilePath: true,
paramType: Diagnostics.FILE_OR_DIRECTORY,
category: Diagnostics.Advanced_Options,
description: Diagnostics.Generates_a_CPU_profile
},
{
name: "incremental",
shortName: "i",