feat(ivy): performance trace mechanism for ngtsc (#29380)

This commit adds a `tracePerformance` option for tsconfig.json. When
specified, it causes a JSON file with timing information from the ngtsc
compiler to be emitted at the specified path.

This tracing system is used to instrument the analysis/emit phases of
compilation, and will be useful in debugging future integration work with
@angular/cli.

See ngtsc/perf/README.md for more details.

PR Close #29380
This commit is contained in:
Alex Rickabaugh
2019-03-18 11:16:38 -07:00
committed by Jason Aden
parent 3e569767e3
commit aaa16f286d
14 changed files with 289 additions and 5 deletions

View File

@ -205,6 +205,17 @@ export interface CompilerOptions extends ts.CompilerOptions {
/** @internal */
collectAllErrors?: boolean;
/** An option to enable ngtsc's internal performance tracing.
*
* This should be a path to a JSON file where trace information will be written. An optional 'ts:'
* prefix will cause the trace to be written via the TS host instead of directly to the filesystem
* (not all hosts support this mode of operation).
*
* This is currently not exposed to users as the trace format is still unstable.
*
* @internal */
tracePerformance?: string;
/**
* Whether NGC should generate re-exports for external symbols which are referenced
* in Angular metadata (e.g. @Component, @Inject, @ViewChild). This can be enabled in