Skip to content
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

Narrow by clause expressions in switches with true condition #53681

Merged
merged 3 commits into from
Sep 18, 2023

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Apr 5, 2023

fixes #37178

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Apr 5, 2023
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #37178. If you can get it accepted, this PR will have a better chance of being reviewed.

@fatcerberus
Copy link

I personally hate this pattern (it feels like the bastard child of JS switch..case and Haskell case expressions) but people ask for TS to support it often enough that I'm not going to argue 😝

I guess it could save you from typing a bunch of parentheses... in exchange for a bunch of break statements 🚎

@codingedgar
Copy link

codingedgar commented Apr 6, 2023

I personally hate this pattern (it feels like the bastard child of JS switch..case and Haskell case expressions) but people ask for TS to support it often enough that I'm not going to argue 😝

I guess it could save you from typing a bunch of parentheses... in exchange for a bunch of break statements 🚎

Seems to be valid js tho https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch#an_alternative_to_if...else_chains

Supporting it is nice 👌

@fatcerberus
Copy link

To be fair, the bar is usually a wee bit higher than "it works in JS" 😉 but yes, I agree that if people are regularly writing code like this, it's nice to support it.

@sandersn sandersn added this to Not started in PR Backlog Apr 18, 2023
@sandersn sandersn moved this from Not started to Waiting on reviewers in PR Backlog Apr 18, 2023
@jakebailey
Copy link
Member

Is the issue actually accepted?

@jakebailey
Copy link
Member

(Code looks good, though.)

@Andarist
Copy link
Contributor Author

Technically it doesnt have the corresponding label - if that’s what you are asking about. This feature was requested multiple times throughout the years and its a pattern mentioned in MDN docs so i jumped the gun on it and just implemented it as an excercise to learn more about CFA implementation in the compiler

const clause = flow.switchStatement.caseBlock.clauses.find((_, index) => index === flow.clauseStart);
const clauseExpression = clause && clause.kind === SyntaxKind.CaseClause ? clause.expression : undefined;
if (clauseExpression) {
type = narrowType(type, clauseExpression, /*assumeTrue*/ true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should probably use narrowTypeByEquality here or something and add corresponding tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I re-examined this and I don't think this is needed anyhow here.

@jakebailey
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Aug 29, 2023

Heya @jakebailey, I've started to run the regular perf test suite on this PR at 7bff88a. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v16.17.1, x64)
Memory used 300,278k (± 0.01%) 300,269k (± 0.01%) ~ 300,254k 300,295k p=0.422 n=6
Parse Time 3.00s (± 0.27%) 3.01s (± 0.35%) ~ 2.99s 3.02s p=0.865 n=6
Bind Time 0.93s (± 0.44%) 0.93s (± 0.00%) ~ 0.93s 0.93s p=0.405 n=6
Check Time 9.33s (± 0.25%) 9.29s (± 0.45%) ~ 9.24s 9.36s p=0.091 n=6
Emit Time 7.61s (± 0.11%) 7.62s (± 0.27%) ~ 7.59s 7.65s p=0.565 n=6
Total Time 20.88s (± 0.09%) 20.85s (± 0.24%) ~ 20.80s 20.93s p=0.332 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 193,942k (± 0.02%) 194,469k (± 0.67%) ~ 193,866k 197,113k p=0.630 n=6
Parse Time 1.58s (± 0.00%) 1.58s (± 0.00%) ~ 1.58s 1.58s p=1.000 n=6
Bind Time 0.80s (± 0.00%) 0.80s (± 0.51%) ~ 0.79s 0.80s p=0.405 n=6
Check Time 9.94s (± 0.31%) 9.93s (± 0.44%) ~ 9.86s 9.96s p=0.806 n=6
Emit Time 2.74s (± 0.36%) 2.74s (± 0.23%) ~ 2.73s 2.75s p=0.733 n=6
Total Time 15.05s (± 0.25%) 15.04s (± 0.31%) ~ 14.97s 15.08s p=1.000 n=6
Monaco - node (v16.17.1, x64)
Memory used 347,200k (± 0.00%) 347,187k (± 0.01%) ~ 347,140k 347,213k p=0.296 n=6
Parse Time 2.69s (± 0.19%) 2.68s (± 0.44%) ~ 2.67s 2.70s p=0.351 n=6
Bind Time 0.99s (± 0.83%) 0.99s (± 0.41%) ~ 0.98s 0.99s p=1.000 n=6
Check Time 7.93s (± 0.26%) 7.93s (± 0.35%) ~ 7.90s 7.96s p=0.516 n=6
Emit Time 4.26s (± 0.27%) 4.25s (± 0.42%) ~ 4.22s 4.27s p=0.324 n=6
Total Time 15.87s (± 0.19%) 15.85s (± 0.32%) ~ 15.78s 15.91s p=0.422 n=6
TFS - node (v16.17.1, x64)
Memory used 301,176k (± 0.00%) 301,180k (± 0.01%) ~ 301,152k 301,203k p=0.468 n=6
Parse Time 2.17s (± 0.39%) 2.18s (± 0.96%) ~ 2.16s 2.22s p=0.109 n=6
Bind Time 1.11s (± 0.37%) 1.11s (± 0.37%) ~ 1.10s 1.11s p=0.218 n=6
Check Time 7.22s (± 0.32%) 7.22s (± 0.26%) ~ 7.20s 7.25s p=0.935 n=6
Emit Time 3.99s (± 0.54%) 3.99s (± 0.41%) ~ 3.98s 4.01s p=0.684 n=6
Total Time 14.49s (± 0.19%) 14.50s (± 0.19%) ~ 14.47s 14.54s p=0.330 n=6
material-ui - node (v16.17.1, x64)
Memory used 479,467k (± 0.00%) 479,460k (± 0.00%) ~ 479,440k 479,475k p=0.688 n=6
Parse Time 3.14s (± 0.13%) 3.15s (± 0.37%) ~ 3.14s 3.17s p=0.087 n=6
Bind Time 0.91s (± 0.00%) 0.91s (± 0.45%) ~ 0.90s 0.91s p=0.405 n=6
Check Time 17.86s (± 0.32%) 17.79s (± 0.32%) ~ 17.71s 17.85s p=0.090 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.92s (± 0.28%) 21.85s (± 0.31%) ~ 21.75s 21.93s p=0.227 n=6
xstate - node (v16.17.1, x64)
Memory used 542,843k (± 0.02%) 542,834k (± 0.02%) ~ 542,760k 542,992k p=0.810 n=6
Parse Time 3.69s (± 0.20%) 3.69s (± 0.22%) ~ 3.68s 3.70s p=0.729 n=6
Bind Time 1.41s (± 4.48%) 1.40s (± 4.31%) ~ 1.34s 1.45s p=0.863 n=6
Check Time 3.26s (± 2.44%) 3.25s (± 2.42%) ~ 3.17s 3.34s p=0.514 n=6
Emit Time 0.08s (± 4.99%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=0.405 n=6
Total Time 8.45s (± 0.64%) 8.42s (± 0.33%) ~ 8.39s 8.46s p=0.295 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • Angular - node (v16.17.1, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Monaco - node (v16.17.1, x64)
  • TFS - node (v16.17.1, x64)
  • material-ui - node (v16.17.1, x64)
  • xstate - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,491ms (± 0.13%) 2,489ms (± 0.14%) ~ 2,485ms 2,495ms p=0.292 n=6
Req 2 - geterr 5,934ms (± 0.37%) 5,939ms (± 0.56%) ~ 5,911ms 5,994ms p=0.873 n=6
Req 3 - references 343ms (± 0.30%) 343ms (± 0.24%) ~ 342ms 344ms p=0.932 n=6
Req 4 - navto 277ms (± 0.23%) 279ms (± 0.74%) ~ 276ms 281ms p=0.179 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 83ms (± 5.23%) 81ms (± 3.12%) ~ 76ms 83ms p=1.000 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,624ms (± 0.78%) 2,622ms (± 0.66%) ~ 2,608ms 2,653ms p=0.810 n=6
Req 2 - geterr 4,780ms (± 0.21%) 4,771ms (± 0.19%) ~ 4,763ms 4,783ms p=0.199 n=6
Req 3 - references 351ms (± 0.18%) 350ms (± 0.23%) ~ 349ms 351ms p=0.177 n=6
Req 4 - navto 269ms (± 0.30%) 270ms (± 0.30%) ~ 269ms 271ms p=0.666 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 79ms (± 0.66%) 79ms (± 0.00%) ~ 79ms 79ms p=0.174 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,710ms (± 0.18%) 2,710ms (± 0.21%) ~ 2,703ms 2,718ms p=0.686 n=6
Req 2 - geterr 1,948ms (± 1.81%) 1,969ms (± 0.40%) ~ 1,958ms 1,978ms p=0.575 n=6
Req 3 - references 137ms (± 2.82%) 136ms (± 6.93%) ~ 117ms 141ms p=0.681 n=6
Req 4 - navto 353ms (± 0.53%) 352ms (± 0.38%) ~ 351ms 354ms p=0.155 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 320ms (± 1.74%) 322ms (± 1.63%) ~ 314ms 326ms p=0.747 n=6
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • CompilerTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 156.12ms (± 0.16%) 156.26ms (± 0.15%) +0.13ms (+ 0.09%) 154.38ms 158.48ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 230.12ms (± 0.14%) 230.79ms (± 0.14%) +0.67ms (+ 0.29%) 229.13ms 235.19ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 235.03ms (± 0.13%) 235.98ms (± 0.14%) +0.95ms (+ 0.41%) 234.48ms 242.85ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 235.95ms (± 0.12%) 235.82ms (± 0.25%) -0.13ms (- 0.05%) 234.09ms 259.32ms p=0.000 n=600
System info unknown
Hosts
  • node (v16.17.1, x64)
Scenarios
  • tsc-startup - node (v16.17.1, x64)
  • tsserver-startup - node (v16.17.1, x64)
  • tsserverlibrary-startup - node (v16.17.1, x64)
  • typescript-startup - node (v16.17.1, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@Andarist
Copy link
Contributor Author

I came back to this after a while and I think this is actually ready to be reviewed.

@jakebailey
Copy link
Member

@typescript-bot test top200
@typescript-bot user test this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100
@typescript-bot run dt
@typescript-bot perf test this
@typescript-bot pack this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the tarball bundle task on this PR at db28e0c. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at db28e0c. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the regular perf test suite on this PR at db28e0c. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at db28e0c. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at db28e0c. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the diff-based user code test suite (tsserver) on this PR at db28e0c. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the diff-based top-repos suite (tsserver) on this PR at db28e0c. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so:

{
    "devDependencies": {
        "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/157766/artifacts?artifactName=tgz&fileId=EF74DF05B649ED2E326973EA68905C7E7E36A9296FF087C24257A4AA04130BF102&fileName=/typescript-5.3.0-insiders.20230915.tgz"
    }
}

and then running npm install.


There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/pr-build@5.3.0-pr-53681-19".;

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

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

LGTM so long as everything comes back clean.

PR Backlog automation moved this from Waiting on reviewers to Needs merge Sep 15, 2023
@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparing main and refs/pull/53681/merge:

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the user test suite comparing main and refs/pull/53681/merge:

There were infrastructure failures potentially unrelated to your change:

  • 1 instance of "Unknown failure"
  • 2 instances of "Package install failed"

Otherwise...

Everything looks good!

@typescript-bot
Copy link
Collaborator

@jakebailey
The results of the perf run you requested are in!

Here they are:

Compiler

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Angular - node (v18.15.0, x64)
Memory used 294,914k (± 0.01%) 294,898k (± 0.01%) ~ 294,854k 294,935k p=0.471 n=6
Parse Time 2.63s (± 0.54%) 2.63s (± 0.29%) ~ 2.62s 2.64s p=0.867 n=6
Bind Time 0.84s (± 0.65%) 0.85s (± 0.61%) ~ 0.84s 0.85s p=0.640 n=6
Check Time 8.03s (± 0.36%) 8.00s (± 0.25%) ~ 7.96s 8.02s p=0.076 n=6
Emit Time 7.03s (± 0.26%) 7.01s (± 0.21%) ~ 6.99s 7.03s p=0.070 n=6
Total Time 18.53s (± 0.24%) 18.48s (± 0.10%) ~ 18.46s 18.51s p=0.065 n=6
Compiler-Unions - node (v18.15.0, x64)
Memory used 192,544k (± 1.51%) 192,567k (± 1.51%) ~ 190,644k 196,339k p=0.471 n=6
Parse Time 1.35s (± 0.60%) 1.35s (± 0.47%) ~ 1.34s 1.36s p=0.432 n=6
Bind Time 0.74s (± 0.00%) 0.74s (± 0.00%) ~ 0.74s 0.74s p=1.000 n=6
Check Time 9.03s (± 0.69%) 9.06s (± 0.44%) ~ 9.01s 9.12s p=0.375 n=6
Emit Time 2.60s (± 0.71%) 2.61s (± 0.71%) ~ 2.58s 2.63s p=0.372 n=6
Total Time 13.73s (± 0.37%) 13.77s (± 0.33%) ~ 13.71s 13.84s p=0.226 n=6
Monaco - node (v18.15.0, x64)
Memory used 347,170k (± 0.01%) 347,160k (± 0.01%) ~ 347,142k 347,182k p=0.296 n=6
Parse Time 2.46s (± 0.40%) 2.46s (± 0.54%) ~ 2.44s 2.47s p=0.396 n=6
Bind Time 0.93s (± 0.55%) 0.94s (± 0.55%) ~ 0.93s 0.94s p=0.311 n=6
Check Time 6.87s (± 0.41%) 6.88s (± 0.71%) ~ 6.82s 6.95s p=0.936 n=6
Emit Time 4.04s (± 0.31%) 4.05s (± 0.60%) ~ 4.02s 4.09s p=0.805 n=6
Total Time 14.30s (± 0.18%) 14.32s (± 0.44%) ~ 14.25s 14.41s p=0.520 n=6
TFS - node (v18.15.0, x64)
Memory used 302,453k (± 0.00%) 302,461k (± 0.01%) ~ 302,439k 302,493k p=0.748 n=6
Parse Time 2.01s (± 0.54%) 2.01s (± 0.51%) ~ 1.99s 2.02s p=0.546 n=6
Bind Time 0.99s (± 1.04%) 1.00s (± 1.17%) ~ 0.99s 1.02s p=0.241 n=6
Check Time 6.25s (± 0.22%) 6.23s (± 0.29%) ~ 6.21s 6.25s p=0.182 n=6
Emit Time 3.52s (± 0.51%) 3.54s (± 0.30%) ~ 3.52s 3.55s p=0.123 n=6
Total Time 12.77s (± 0.21%) 12.78s (± 0.15%) ~ 12.75s 12.80s p=0.332 n=6
material-ui - node (v18.15.0, x64)
Memory used 470,440k (± 0.01%) 470,434k (± 0.01%) ~ 470,343k 470,493k p=0.873 n=6
Parse Time 2.59s (± 0.47%) 2.59s (± 0.76%) ~ 2.56s 2.61s p=0.366 n=6
Bind Time 1.00s (± 0.98%) 1.00s (± 1.17%) ~ 0.98s 1.01s p=0.673 n=6
Check Time 16.53s (± 0.37%) 16.59s (± 0.39%) ~ 16.48s 16.64s p=0.198 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 20.11s (± 0.31%) 20.18s (± 0.33%) ~ 20.07s 20.24s p=0.127 n=6
xstate - node (v18.15.0, x64)
Memory used 512,225k (± 0.01%) 512,213k (± 0.01%) ~ 512,158k 512,271k p=0.521 n=6
Parse Time 3.26s (± 0.13%) 3.26s (± 0.17%) ~ 3.25s 3.26s p=0.054 n=6
Bind Time 1.55s (± 0.41%) 1.55s (± 0.00%) ~ 1.55s 1.55s p=1.000 n=6
Check Time 2.78s (± 0.49%) 2.78s (± 0.43%) ~ 2.77s 2.80s p=1.000 n=6
Emit Time 0.08s (± 7.90%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 7.67s (± 0.18%) 7.66s (± 0.21%) ~ 7.64s 7.68s p=0.182 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • Angular - node (v18.15.0, x64)
  • Compiler-Unions - node (v18.15.0, x64)
  • Monaco - node (v18.15.0, x64)
  • TFS - node (v18.15.0, x64)
  • material-ui - node (v18.15.0, x64)
  • xstate - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

tsserver

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,401ms (± 1.15%) 2,361ms (± 1.71%) ~ 2,316ms 2,412ms p=0.093 n=6
Req 2 - geterr 5,281ms (± 1.13%) 5,328ms (± 1.64%) ~ 5,227ms 5,427ms p=0.575 n=6
Req 3 - references 328ms (± 0.89%) 330ms (± 1.29%) ~ 326ms 335ms p=0.805 n=6
Req 4 - navto 277ms (± 0.53%) 276ms (± 0.48%) ~ 274ms 277ms p=0.197 n=6
Req 5 - completionInfo count 1,356 (± 0.00%) 1,356 (± 0.00%) ~ 1,356 1,356 p=1.000 n=6
Req 5 - completionInfo 85ms (± 4.52%) 83ms (± 5.40%) ~ 78ms 89ms p=0.492 n=6
CompilerTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,481ms (± 0.42%) 2,476ms (± 1.22%) ~ 2,417ms 2,498ms p=0.688 n=6
Req 2 - geterr 4,067ms (± 1.37%) 4,092ms (± 1.74%) ~ 4,040ms 4,197ms p=0.575 n=6
Req 3 - references 334ms (± 0.31%) 337ms (± 1.17%) ~ 333ms 342ms p=0.560 n=6
Req 4 - navto 282ms (± 0.54%) 282ms (± 0.48%) ~ 280ms 283ms p=0.934 n=6
Req 5 - completionInfo count 1,518 (± 0.00%) 1,518 (± 0.00%) ~ 1,518 1,518 p=1.000 n=6
Req 5 - completionInfo 73ms (± 3.41%) 79ms (± 9.46%) ~ 72ms 88ms p=0.209 n=6
xstateTSServer - node (v18.15.0, x64)
Req 1 - updateOpen 2,598ms (± 0.78%) 2,600ms (± 0.92%) ~ 2,562ms 2,631ms p=0.872 n=6
Req 2 - geterr 1,687ms (± 2.12%) 1,681ms (± 2.17%) ~ 1,628ms 1,727ms p=0.810 n=6
Req 3 - references 112ms (± 8.51%) 116ms (± 8.89%) ~ 105ms 126ms p=0.572 n=6
Req 4 - navto 367ms (± 1.51%) 364ms (± 0.21%) ~ 363ms 365ms p=0.103 n=6
Req 5 - completionInfo count 2,071 (± 0.00%) 2,071 (± 0.00%) ~ 2,071 2,071 p=1.000 n=6
Req 5 - completionInfo 306ms (± 1.40%) 308ms (± 2.10%) ~ 298ms 316ms p=0.419 n=6
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • CompilerTSServer - node (v18.15.0, x64)
  • Compiler-UnionsTSServer - node (v18.15.0, x64)
  • xstateTSServer - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Startup

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
tsc-startup - node (v18.15.0, x64)
Execution time 151.70ms (± 0.16%) 151.63ms (± 0.22%) -0.08ms (- 0.05%) 150.60ms 160.99ms p=0.000 n=600
tsserver-startup - node (v18.15.0, x64)
Execution time 226.88ms (± 0.14%) 226.58ms (± 0.15%) -0.31ms (- 0.14%) 225.52ms 232.65ms p=0.000 n=600
tsserverlibrary-startup - node (v18.15.0, x64)
Execution time 228.10ms (± 0.16%) 228.11ms (± 0.19%) ~ 226.36ms 235.08ms p=0.462 n=600
typescript-startup - node (v18.15.0, x64)
Execution time 227.91ms (± 0.15%) 227.92ms (± 0.17%) ~ 226.40ms 234.11ms p=0.795 n=600
System info unknown
Hosts
  • node (v18.15.0, x64)
Scenarios
  • tsc-startup - node (v18.15.0, x64)
  • tsserver-startup - node (v18.15.0, x64)
  • tsserverlibrary-startup - node (v18.15.0, x64)
  • typescript-startup - node (v18.15.0, x64)
Benchmark Name Iterations
Current pr 6
Baseline baseline 6

Developer Information:

Download Benchmarks

@jakebailey
Copy link
Member

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 15, 2023

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at db28e0c. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top-repos suite comparing main and refs/pull/53681/merge:

Everything looks good!

1 similar comment
@typescript-bot
Copy link
Collaborator

@jakebailey Here are the results of running the top-repos suite comparing main and refs/pull/53681/merge:

Everything looks good!

@jakebailey
Copy link
Member

@typescript-bot run dt

@typescript-bot
Copy link
Collaborator

typescript-bot commented Sep 16, 2023

Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at db28e0c. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

Hey @jakebailey, the results of running the DT tests are ready.
Everything looks the same!
You can check the log here.

@jakebailey jakebailey merged commit 70b7de1 into microsoft:main Sep 18, 2023
19 checks passed
PR Backlog automation moved this from Needs merge to Done Sep 18, 2023
@joscha
Copy link
Contributor

joscha commented Sep 18, 2023

Well done @Andarist, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
PR Backlog
  
Done
Development

Successfully merging this pull request may close these issues.

Narrowing types by typeof inside switch (true) does not work
7 participants