Skip to content

Report aggregate statistics for solution as well as some solution perf numbers #50267

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

Merged
merged 5 commits into from
Aug 11, 2022

Conversation

sheetalkamat
Copy link
Member

@sheetalkamat sheetalkamat commented Aug 10, 2022

This change under --extendedDiagnostics aggregates the diagnostics from all projects built and reports it at the end. Apart from that it also outputs some measurements for work that happens in tsc --build like finding if projects are uptodate etc.
Also removes unnecessary node count per suggestion by @amcasey

Different work per suggestion by @rbuckton in #49285

c:\TypeScript>node c:\TypeScript\built\local\tsc.js -b src --extendedDiagnostics -v
[4:35:05 PM] Projects in this build:
    * src/compiler/tsconfig.json
    * src/executeCommandLine/tsconfig.json
    * src/tsc/tsconfig.json
    * src/jsTyping/tsconfig.json
    * src/services/tsconfig.json
    * src/server/tsconfig.json
    * src/webServer/tsconfig.json
    * src/deprecatedCompat/tsconfig.json
    * src/tsserver/tsconfig.json
    * src/typingsInstallerCore/tsconfig.json
    * src/typingsInstaller/tsconfig.json
    * src/watchGuard/tsconfig.json
    * src/debug/tsconfig.json
    * src/cancellationToken/tsconfig.json
    * src/dynamicImportCompat/tsconfig.json
    * src/harness/tsconfig.json
    * src/loggedIO/tsconfig.json
    * src/testRunner/tsconfig.json
    * src/tsconfig.json

[4:35:05 PM] Project 'src/compiler/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:05 PM] Building project 'c:/TypeScript/src/compiler/tsconfig.json'...

Files:                         163
Lines of Library:             9124
Lines of Definitions:        37786
Lines of TypeScript:        155407
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                360048
Symbols:                    206708
Types:                       85416
Instantiations:             144470
Memory used:               569041K
Assignability cache size:    34575
Identity cache size:          2497
Subtype cache size:          15697
Strict subtype cache size:    3387
I/O Read time:               0.05s
Parse time:                  1.72s
ResolveModule time:          0.05s
ResolveTypeReference time:   0.00s
Program time:                1.91s
Bind time:                   1.07s
Check time:                 11.68s
transformTime time:          1.66s
Source Map time:             0.58s
commentTime time:            0.68s
printTime time:              7.81s
Emit time:                   7.81s
I/O Write time:              0.02s
Total time:                 22.48s
[4:35:28 PM] Project 'src/executeCommandLine/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:28 PM] Building project 'c:/TypeScript/src/executeCommandLine/tsconfig.json'...

Files:                           7
Lines of Library:             5151
Lines of Definitions:        14701
Lines of TypeScript:          1192
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 44217
Symbols:                     26997
Types:                        2472
Instantiations:               1897
Memory used:               600509K
Assignability cache size:      475
Identity cache size:            19
Subtype cache size:             19
Strict subtype cache size:      12
I/O Read time:               0.00s
Parse time:                  0.12s
ResolveModule time:          0.00s
Program time:                0.14s
Bind time:                   0.09s
Check time:                  0.32s
transformTime time:          0.02s
Source Map time:             0.00s
commentTime time:            0.01s
printTime time:              0.11s
Emit time:                   0.11s
I/O Write time:              0.00s
Total time:                  0.65s
[4:35:28 PM] Project 'src/tsc/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:28 PM] Building project 'c:/TypeScript/src/tsc/tsconfig.json'...

Files:                           8
Lines of Library:             5151
Lines of Definitions:        14712
Lines of TypeScript:            24
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 41905
Symbols:                     24508
Types:                         141
Instantiations:                  2
Memory used:               649309K
Assignability cache size:       10
Identity cache size:             0
Subtype cache size:              0
Strict subtype cache size:       0
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.00s
Program time:                0.00s
Bind time:                   0.00s
Check time:                  0.00s
transformTime time:          0.00s
commentTime time:            0.00s
Source Map time:             0.40s
printTime time:              0.53s
Emit time:                   0.53s
I/O Write time:              0.02s
Total time:                  0.54s
[4:35:29 PM] Project 'src/jsTyping/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:29 PM] Building project 'c:/TypeScript/src/jsTyping/tsconfig.json'...

Files:                          98
Lines of Library:             9452
Lines of Definitions:        52459
Lines of TypeScript:           590
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 76638
Symbols:                     49016
Types:                        1194
Instantiations:                435
Memory used:               664396K
Assignability cache size:      111
Identity cache size:            11
Subtype cache size:              9
Strict subtype cache size:       1
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.01s
ResolveTypeReference time:   0.00s
Program time:                0.01s
Bind time:                   0.00s
Check time:                  0.07s
transformTime time:          0.01s
Source Map time:             0.00s
commentTime time:            0.00s
printTime time:              0.04s
Emit time:                   0.04s
I/O Write time:              0.00s
Total time:                  0.13s
[4:35:29 PM] Project 'src/services/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:29 PM] Building project 'c:/TypeScript/src/services/tsconfig.json'...

Files:                         133
Lines of Library:             5151
Lines of Definitions:        14874
Lines of TypeScript:         50545
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                151814
Symbols:                     97990
Types:                       35372
Instantiations:              43975
Memory used:               294636K
Assignability cache size:    13509
Identity cache size:          1338
Subtype cache size:           7819
Strict subtype cache size:    1452
ResolveModule time:          0.00s
I/O Read time:               0.03s
Parse time:                  0.35s
Program time:                0.39s
Bind time:                   0.33s
Check time:                  5.74s
transformTime time:          0.48s
Source Map time:             0.20s
commentTime time:            0.24s
printTime time:              2.91s
Emit time:                   2.91s
I/O Write time:              0.01s
Total time:                  9.36s
[4:35:39 PM] Project 'src/server/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:39 PM] Building project 'c:/TypeScript/src/server/tsconfig.json'...

Files:                         108
Lines of Library:             9124
Lines of Definitions:        56118
Lines of TypeScript:         16299
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                108449
Symbols:                     84156
Types:                       15174
Instantiations:              19049
Memory used:               353555K
Assignability cache size:     4176
Identity cache size:           219
Subtype cache size:            709
Strict subtype cache size:    3493
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.11s
ResolveTypeReference time:   0.00s
Program time:                0.12s
Bind time:                   0.09s
Check time:                  1.18s
transformTime time:          0.22s
Source Map time:             0.05s
commentTime time:            0.07s
printTime time:              0.78s
Emit time:                   0.78s
I/O Write time:              0.01s
Total time:                  2.17s
[4:35:41 PM] Project 'src/webServer/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:41 PM] Building project 'c:/TypeScript/src/webServer/tsconfig.json'...

Files:                         100
Lines of Library:            27419
Lines of Definitions:        60921
Lines of TypeScript:           267
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                122132
Symbols:                     78421
Types:                         584
Instantiations:                371
Memory used:               375693K
Assignability cache size:       91
Identity cache size:            23
Subtype cache size:             10
Strict subtype cache size:       0
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.12s
ResolveTypeReference time:   0.00s
Program time:                0.13s
Bind time:                   0.05s
Check time:                  0.03s
transformTime time:          0.01s
Source Map time:             0.00s
commentTime time:            0.00s
printTime time:              0.02s
Emit time:                   0.02s
I/O Write time:              0.00s
Total time:                  0.24s
[4:35:41 PM] Project 'src/deprecatedCompat/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:41 PM] Building project 'c:/TypeScript/src/deprecatedCompat/tsconfig.json'...

Files:                          15
Lines of Library:             5151
Lines of Definitions:        14701
Lines of TypeScript:          3185
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 50363
Symbols:                     36860
Types:                        7242
Instantiations:              15756
Memory used:               406904K
Assignability cache size:     3452
Identity cache size:            18
Subtype cache size:            428
Strict subtype cache size:       9
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.02s
Program time:                0.03s
Bind time:                   0.02s
Check time:                  0.52s
transformTime time:          0.15s
Source Map time:             0.01s
commentTime time:            0.03s
printTime time:              0.29s
Emit time:                   0.29s
I/O Write time:              0.00s
Total time:                  0.86s
[4:35:42 PM] Project 'src/tsserver/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:42 PM] Building project 'c:/TypeScript/src/tsserver/tsconfig.json'...

Files:                         105
Lines of Library:            33376
Lines of Definitions:        62190
Lines of TypeScript:          1101
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                140380
Symbols:                     94999
Types:                        3833
Instantiations:               1943
Memory used:               496318K
Assignability cache size:      578
Identity cache size:             4
Subtype cache size:             45
Strict subtype cache size:      26
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.05s
ResolveTypeReference time:   0.00s
Program time:                0.06s
Bind time:                   0.03s
Check time:                  0.13s
transformTime time:          0.01s
commentTime time:            0.01s
Source Map time:             0.47s
printTime time:              0.76s
Emit time:                   0.76s
I/O Write time:              0.02s
Total time:                  0.98s
[4:35:43 PM] Project 'src/typingsInstallerCore/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:43 PM] Building project 'c:/TypeScript/src/typingsInstallerCore/tsconfig.json'...

Files:                          97
Lines of Library:             9452
Lines of Definitions:        52632
Lines of TypeScript:           547
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 77094
Symbols:                     49526
Types:                        1152
Instantiations:               1166
Memory used:               513225K
Assignability cache size:      187
Identity cache size:             2
Subtype cache size:              7
Strict subtype cache size:       2
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.00s
ResolveTypeReference time:   0.00s
Program time:                0.01s
Bind time:                   0.00s
Check time:                  0.06s
transformTime time:          0.01s
Source Map time:             0.00s
commentTime time:            0.00s
printTime time:              0.05s
Emit time:                   0.05s
I/O Write time:              0.00s
Total time:                  0.12s
[4:35:43 PM] Project 'src/typingsInstaller/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:43 PM] Building project 'c:/TypeScript/src/typingsInstaller/tsconfig.json'...

Files:                          98
Lines of Library:             9452
Lines of Definitions:        52690
Lines of TypeScript:           256
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 76672
Symbols:                     49076
Types:                         695
Instantiations:                330
Memory used:               557309K
Assignability cache size:      130
Identity cache size:             2
Subtype cache size:              9
Strict subtype cache size:       1
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.00s
ResolveTypeReference time:   0.00s
Program time:                0.01s
Bind time:                   0.00s
Check time:                  0.04s
transformTime time:          0.00s
Source Map time:             0.38s
commentTime time:            0.00s
printTime time:              0.56s
Emit time:                   0.56s
I/O Write time:              0.02s
Total time:                  0.61s
[4:35:44 PM] Project 'src/watchGuard/tsconfig.json' is up to date because newest input 'src/watchGuard/watchGuard.ts' is older than output 'built/local/watchGuard.js'

[4:35:44 PM] Project 'src/debug/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:44 PM] Building project 'c:/TypeScript/src/debug/tsconfig.json'...

Files:                          31
Lines of Library:             7602
Lines of Definitions:            0
Lines of TypeScript:           516
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                  9424
Symbols:                      5477
Types:                         502
Instantiations:                402
Memory used:               569220K
Assignability cache size:      125
Identity cache size:             0
Subtype cache size:            117
Strict subtype cache size:       0
I/O Read time:               0.00s
Parse time:                  0.01s
Program time:                0.03s
Bind time:                   0.00s
Check time:                  0.05s
transformTime time:          0.00s
Source Map time:             0.00s
commentTime time:            0.00s
printTime time:              0.04s
Emit time:                   0.04s
I/O Write time:              0.00s
Total time:                  0.12s
[4:35:44 PM] Project 'src/cancellationToken/tsconfig.json' is up to date because newest input 'src/cancellationToken/cancellationToken.ts' is older than output 'built/local/cancellationToken.js'

[4:35:44 PM] Project 'src/dynamicImportCompat/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:44 PM] Building project 'c:/TypeScript/src/dynamicImportCompat/tsconfig.json'...

Files:                          54
Lines of Library:             9916
Lines of Definitions:            0
Lines of TypeScript:             3
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 10027
Symbols:                      5349
Types:                          85
Instantiations:                  0
Memory used:               561280K
Assignability cache size:        0
Identity cache size:             0
Subtype cache size:              0
Strict subtype cache size:       0
I/O Read time:               0.01s
Parse time:                  0.01s
Program time:                0.08s
Bind time:                   0.00s
Check time:                  0.00s
transformTime time:          0.00s
Source Map time:             0.00s
commentTime time:            0.00s
printTime time:              0.01s
Emit time:                   0.01s
I/O Write time:              0.00s
Total time:                  0.09s
[4:35:44 PM] Project 'src/harness/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:44 PM] Building project 'c:/TypeScript/src/harness/tsconfig.json'...

Files:                         124
Lines of Library:             9452
Lines of Definitions:        67199
Lines of TypeScript:         16026
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                132801
Symbols:                     98529
Types:                       18477
Instantiations:              19919
Memory used:               349358K
Assignability cache size:     3758
Identity cache size:           385
Subtype cache size:            647
Strict subtype cache size:     200
ResolveModule time:          0.02s
I/O Read time:               0.01s
Parse time:                  0.39s
ResolveTypeReference time:   0.01s
Program time:                0.50s
Bind time:                   0.28s
Check time:                  2.93s
transformTime time:          0.46s
Source Map time:             0.08s
commentTime time:            0.14s
printTime time:              1.51s
Emit time:                   1.51s
I/O Write time:              0.00s
Total time:                  5.22s
[4:35:50 PM] Project 'src/loggedIO/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:50 PM] Building project 'c:/TypeScript/src/loggedIO/tsconfig.json'...

Files:                         102
Lines of Library:             9452
Lines of Definitions:        65485
Lines of TypeScript:           452
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                 97520
Symbols:                     63602
Types:                         857
Instantiations:                553
Memory used:               362659K
Assignability cache size:      165
Identity cache size:             3
Subtype cache size:             17
Strict subtype cache size:       6
ResolveModule time:          0.00s
I/O Read time:               0.00s
Parse time:                  0.02s
ResolveTypeReference time:   0.00s
Program time:                0.03s
Bind time:                   0.03s
Check time:                  0.07s
transformTime time:          0.01s
Source Map time:             0.00s
commentTime time:            0.00s
printTime time:              0.03s
Emit time:                   0.03s
I/O Write time:              0.00s
Total time:                  0.15s
[4:35:50 PM] Project 'src/testRunner/tsconfig.json' is out of date because output for it was generated with version '4.4.0-dev' that differs with current version '4.9.0-dev'

[4:35:50 PM] Building project 'c:/TypeScript/src/testRunner/tsconfig.json'...

Files:                         339
Lines of Library:            27747
Lines of Definitions:        70624
Lines of TypeScript:         66447
Lines of JavaScript:             0
Lines of JSON:                   0
Lines of Other:                  0
Identifiers:                242530
Symbols:                    209123
Types:                       59355
Instantiations:              29310
Memory used:               646515K
Assignability cache size:    15381
Identity cache size:           313
Subtype cache size:           3643
Strict subtype cache size:    2104
ResolveModule time:          0.03s
ResolveTypeReference time:   0.01s
I/O Read time:               0.04s
Parse time:                  0.38s
Program time:                0.51s
Bind time:                   0.37s
Check time:                  4.20s
transformTime time:          0.43s
commentTime time:            0.28s
Source Map time:             0.95s
printTime time:              4.39s
Emit time:                   4.39s
I/O Write time:              0.03s
Total time:                  9.48s
Projects in scope:                        19
Projects built:                           16
Aggregate Files:                        1582
Aggregate Lines of Library:           192172
Aggregate Lines of Definitions:       637092
Aggregate Lines of TypeScript:        312857
Aggregate Lines of JavaScript:             0
Aggregate Lines of JSON:                   0
Aggregate Lines of Other:                  0
Aggregate Identifiers:               1742014
Aggregate Symbols:                   1180337
Aggregate Types:                      232551
Aggregate Instantiations:             279578
Aggregate Memory used:               664396K
Aggregate Assignability cache size:    76723
Aggregate Identity cache size:          4834
Aggregate Subtype cache size:          29176
Aggregate Strict subtype cache size:   10693
Aggregate I/O Read time:               0.16s
Aggregate Parse time:                  3.32s
Aggregate ResolveModule time:          0.11s
Aggregate ResolveTypeReference time:   0.02s
Aggregate Program time:                3.97s
Aggregate Bind time:                   2.37s
Aggregate Check time:                 27.02s
Aggregate transformTime time:          3.47s
Aggregate Source Map time:             3.12s
Aggregate commentTime time:            1.44s
Aggregate printTime time:             19.84s
Aggregate Emit time:                  19.84s
Aggregate I/O Write time:              0.15s
Config file parsing time:              0.08s
Up-to-date check time time:            0.01s
Build time:                           54.67s

c:\TypeScript>

…f numbers

This change under --extendedDiagnostics aggregates the diagnostics from all projects built and reports it at the end. Apart from that it also outputs some measurements for work that happens in tsc --build like finding if projects are uptodate etc.
Also removes unnecessary node count per suggestion
@sheetalkamat
Copy link
Member Author

@typescript-bot pack this

@@ -73,8 +77,8 @@ namespace ts {
try {
let performance: Performance;
const { performance: nodePerformance, PerformanceObserver } = require("perf_hooks") as typeof import("perf_hooks");
if (hasRequiredAPI(nodePerformance, PerformanceObserver)) {
performance = nodePerformance;
if (hasRequiredAPI(nodePerformance as unknown as Performance, PerformanceObserver)) {
Copy link
Contributor

@rbuckton rbuckton Aug 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this because our reference to @types/node is out of date? clearMeasures was added in NodeJS v16.7.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes its because of our @types/node

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we shouldn't update our local copy of @types/node to at least v16?

@amcasey
Copy link
Member

amcasey commented Aug 11, 2022

Nit: Up-to-date check time time

Copy link
Member

@amcasey amcasey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't read the code change (which I assume is largely as before), but I like the output.

Copy link
Contributor

@rbuckton rbuckton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine, though we may want to consider updating our @types/node definitions to at least v16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants