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

fix: no variable suggestions without semicolon #54656

Conversation

zardoy
Copy link
Contributor

@zardoy zardoy commented Jun 15, 2023

don't use contextToken for finding closest variable declaration

Fixes #54654

I think there could be a better fix (rather than using location and contextToken at the same time)

@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jun 15, 2023
@zardoy
Copy link
Contributor Author

zardoy commented Jun 15, 2023

I'm not sure, probably contextToken shouldn't be 1 in the following example?

const a = 1
/**/

@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 22, 2023
@DanielRosenwasser
Copy link
Member

@typescript-bot pack this
@typescript-bot user test tsserver
@typescript-bot test tsserver top100

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 22, 2023

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

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 22, 2023

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

Update: The results are in!

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 22, 2023

Hey @DanielRosenwasser, 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/155585/artifacts?artifactName=tgz&fileId=B82DD230FA66DF3565CB849AD5B29058632761EFF9668B7FDC9B81D93537AC6F02&fileName=/typescript-5.2.0-insiders.20230622.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.2.0-pr-54656-5".;

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@@ -5516,14 +5516,18 @@ function isModuleSpecifierMissingOrEmpty(specifier: ModuleReference | Expression
return !tryCast(isExternalModuleReference(specifier) ? specifier.expression : specifier, isStringLiteralLike)?.text;
}

function getVariableOrParameterDeclaration(contextToken: Node | undefined) {
function getVariableOrParameterDeclaration(contextToken: Node | undefined, location: Node) {
if (!contextToken) return;
Copy link
Member

Choose a reason for hiding this comment

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

Should we still return early if contextToken is undefined? Can we have a valid case where contextToken is undefined but location is defined?

Copy link
Contributor Author

@zardoy zardoy Jun 23, 2023

Choose a reason for hiding this comment

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

Actually I didn't think about it when I opened this PR. Though for me its obvious that it can be undefined only when there is no tokens behind the requesting position at all (as essentially contextToken is previousToken). Otherwise it will be something like OpenBraceToken.

src/services/completions.ts Outdated Show resolved Hide resolved
if (!contextToken) return;

const declaration = findAncestor(contextToken, node =>
const possiblyParameterDeclaration = findAncestor(contextToken, node =>
Copy link
Contributor

Choose a reason for hiding this comment

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

I know that the existing code already uses findAncestor, but is this really needed @DanielRosenwasser? Can't we restrict the scope of this search?

Copy link
Member

Choose a reason for hiding this comment

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

Do you mean do we really need two walks? I'm not sure; we could probably rewrite this to only do the second walk if the first fails though.

Copy link
Member

Choose a reason for hiding this comment

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

Another way to do this is to check whether the contextToken ever becomes the location, and only then to start checking for variable declarations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean do we really need two walks? I'm not sure; we could probably rewrite this to only do the second walk if the first fails though.

I'm not sure I'm following initial request here. Why we can't have two walks here? (since it uses existing ast and we also do it only once per completionInfo request)

@typescript-bot
Copy link
Collaborator

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

Everything looks good!

@DanielRosenwasser
Copy link
Member

@typescript-bot perf test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 23, 2023

Heya @DanielRosenwasser, I've started to run the perf test suite on this PR at 4c2bcc9. You can monitor the build here.

Update: The results are in!

@typescript-bot
Copy link
Collaborator

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

Here they are:

Compiler

Comparison Report - main..54656
Metric main 54656 Delta Best Worst p-value
Angular - node (v18.10.0, x64)
Memory used 366,630k (± 0.01%) 366,639k (± 0.01%) ~ 366,616k 366,684k p=0.378 n=6
Parse Time 3.42s (± 0.57%) 3.41s (± 0.34%) ~ 3.40s 3.43s p=0.411 n=6
Bind Time 1.12s (± 0.92%) 1.11s (± 0.73%) ~ 1.10s 1.12s p=0.546 n=6
Check Time 8.86s (± 0.63%) 8.84s (± 0.25%) ~ 8.81s 8.87s p=1.000 n=6
Emit Time 7.52s (± 0.84%) 7.48s (± 0.53%) ~ 7.44s 7.54s p=0.199 n=6
Total Time 20.92s (± 0.52%) 20.85s (± 0.14%) ~ 20.82s 20.90s p=0.227 n=6
Compiler-Unions - node (v18.10.0, x64)
Memory used 190,988k (± 0.02%) 191,919k (± 1.20%) ~ 190,947k 196,641k p=0.936 n=6
Parse Time 1.49s (± 0.92%) 1.49s (± 0.69%) ~ 1.48s 1.51s p=0.315 n=6
Bind Time 0.77s (± 1.05%) 0.77s (± 0.72%) ~ 0.76s 0.77s p=0.088 n=6
Check Time 9.50s (± 0.42%) 9.44s (± 0.96%) ~ 9.26s 9.50s p=0.146 n=6
Emit Time 2.76s (± 0.81%) 2.75s (± 0.76%) ~ 2.73s 2.78s p=0.366 n=6
Total Time 14.52s (± 0.36%) 14.45s (± 0.52%) ~ 14.30s 14.49s p=0.067 n=6
Monaco - node (v18.10.0, x64)
Memory used 346,794k (± 0.01%) 346,823k (± 0.01%) ~ 346,771k 346,874k p=0.229 n=6
Parse Time 2.59s (± 0.80%) 2.60s (± 0.67%) ~ 2.57s 2.62s p=0.120 n=6
Bind Time 1.01s (± 0.75%) 1.00s (± 0.83%) ~ 1.00s 1.02s p=0.432 n=6
Check Time 7.20s (± 0.53%) 7.18s (± 0.40%) ~ 7.16s 7.22s p=0.286 n=6
Emit Time 4.26s (± 0.86%) 4.23s (± 0.48%) ~ 4.20s 4.26s p=0.171 n=6
Total Time 15.05s (± 0.52%) 15.02s (± 0.26%) ~ 14.97s 15.07s p=0.630 n=6
TFS - node (v18.10.0, x64)
Memory used 300,885k (± 0.00%) 300,867k (± 0.01%) ~ 300,850k 300,892k p=0.078 n=6
Parse Time 2.08s (± 0.26%) 2.06s (± 0.94%) ~ 2.04s 2.09s p=0.056 n=6
Bind Time 1.14s (± 0.86%) 1.13s (± 0.72%) ~ 1.12s 1.14s p=0.177 n=6
Check Time 6.66s (± 0.53%) 6.64s (± 0.43%) ~ 6.60s 6.68s p=0.466 n=6
Emit Time 3.88s (± 0.67%) 3.84s (± 0.69%) ~ 3.81s 3.88s p=0.063 n=6
Total Time 13.76s (± 0.25%) 13.68s (± 0.29%) -0.08s (- 0.57%) 13.64s 13.74s p=0.016 n=6
material-ui - node (v18.10.0, x64)
Memory used 482,394k (± 0.02%) 482,310k (± 0.01%) ~ 482,224k 482,404k p=0.109 n=6
Parse Time 3.12s (± 0.70%) 3.13s (± 0.80%) ~ 3.08s 3.15s p=0.418 n=6
Bind Time 0.92s (± 1.15%) 0.91s (± 0.56%) ~ 0.91s 0.92s p=0.794 n=6
Check Time 16.97s (± 0.63%) 16.87s (± 0.33%) ~ 16.77s 16.93s p=0.092 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 21.00s (± 0.57%) 20.91s (± 0.37%) ~ 20.76s 20.98s p=0.149 n=6
xstate - node (v18.10.0, x64)
Memory used 564,264k (± 0.03%) 564,138k (± 0.01%) ~ 564,087k 564,241k p=0.128 n=6
Parse Time 3.85s (± 0.72%) 3.83s (± 0.74%) ~ 3.78s 3.86s p=0.462 n=6
Bind Time 1.64s (± 0.50%) 1.64s (± 0.83%) ~ 1.62s 1.65s p=0.806 n=6
Check Time 2.80s (± 1.53%) 2.81s (± 0.58%) ~ 2.78s 2.83s p=1.000 n=6
Emit Time 0.08s (± 0.00%) 0.08s (± 0.00%) ~ 0.08s 0.08s p=1.000 n=6
Total Time 8.36s (± 0.63%) 8.35s (± 0.48%) ~ 8.31s 8.43s p=1.000 n=6
Angular - node (v16.17.1, x64)
Memory used 366,001k (± 0.00%) 366,002k (± 0.00%) ~ 365,977k 366,030k p=0.872 n=6
Parse Time 3.58s (± 0.52%) 3.58s (± 0.23%) ~ 3.57s 3.59s p=0.869 n=6
Bind Time 1.18s (± 0.35%) 1.18s (± 0.44%) ~ 1.17s 1.18s p=0.114 n=6
Check Time 9.68s (± 0.37%) 9.64s (± 0.48%) ~ 9.56s 9.70s p=0.418 n=6
Emit Time 8.03s (± 0.90%) 7.95s (± 0.43%) ~ 7.91s 7.99s p=0.089 n=6
Total Time 22.46s (± 0.53%) 22.35s (± 0.35%) ~ 22.21s 22.43s p=0.199 n=6
Compiler-Unions - node (v16.17.1, x64)
Memory used 192,822k (± 0.03%) 192,793k (± 0.04%) ~ 192,663k 192,900k p=0.575 n=6
Parse Time 1.59s (± 0.62%) 1.59s (± 1.70%) ~ 1.54s 1.61s p=0.287 n=6
Bind Time 0.83s (± 1.27%) 0.82s (± 1.20%) ~ 0.81s 0.83s p=0.315 n=6
Check Time 10.14s (± 0.50%) 10.10s (± 0.60%) ~ 10.01s 10.18s p=0.126 n=6
Emit Time 3.01s (± 0.59%) 3.01s (± 0.87%) ~ 2.98s 3.05s p=0.936 n=6
Total Time 15.56s (± 0.50%) 15.51s (± 0.51%) ~ 15.39s 15.60s p=0.377 n=6
Monaco - node (v16.17.1, x64)
Memory used 346,066k (± 0.00%) 346,056k (± 0.00%) ~ 346,042k 346,074k p=0.228 n=6
Parse Time 2.73s (± 0.44%) 2.72s (± 0.36%) ~ 2.71s 2.74s p=0.102 n=6
Bind Time 1.08s (± 0.75%) 1.09s (± 0.47%) ~ 1.08s 1.09s p=0.523 n=6
Check Time 7.87s (± 0.50%) 7.86s (± 0.51%) ~ 7.81s 7.91s p=0.808 n=6
Emit Time 4.47s (± 0.70%) 4.50s (± 1.00%) ~ 4.44s 4.56s p=0.171 n=6
Total Time 16.16s (± 0.44%) 16.18s (± 0.46%) ~ 16.06s 16.27s p=0.873 n=6
TFS - node (v16.17.1, x64)
Memory used 300,203k (± 0.01%) 300,205k (± 0.01%) ~ 300,175k 300,251k p=0.873 n=6
Parse Time 2.17s (± 0.48%) 2.17s (± 0.45%) ~ 2.16s 2.18s p=0.673 n=6
Bind Time 1.23s (± 0.95%) 1.23s (± 0.42%) ~ 1.23s 1.24s p=0.666 n=6
Check Time 7.31s (± 0.63%) 7.31s (± 0.55%) ~ 7.27s 7.36s p=0.872 n=6
Emit Time 4.32s (± 0.99%) 4.36s (± 0.89%) ~ 4.28s 4.39s p=0.121 n=6
Total Time 15.03s (± 0.54%) 15.07s (± 0.52%) ~ 14.95s 15.17s p=0.521 n=6
material-ui - node (v16.17.1, x64)
Memory used 481,612k (± 0.01%) 481,643k (± 0.01%) ~ 481,604k 481,695k p=0.298 n=6
Parse Time 3.27s (± 0.59%) 3.25s (± 0.45%) ~ 3.23s 3.27s p=0.146 n=6
Bind Time 0.95s (± 0.94%) 0.94s (± 0.58%) ~ 0.94s 0.95s p=0.341 n=6
Check Time 17.97s (± 0.73%) 17.93s (± 0.48%) ~ 17.84s 18.08s p=0.630 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 22.18s (± 0.66%) 22.13s (± 0.41%) ~ 22.03s 22.29s p=0.521 n=6
xstate - node (v16.17.1, x64)
Memory used 561,714k (± 0.02%) 561,707k (± 0.01%) ~ 561,617k 561,829k p=1.000 n=6
Parse Time 4.00s (± 0.38%) 4.00s (± 0.19%) ~ 3.99s 4.01s p=0.933 n=6
Bind Time 1.74s (± 1.05%) 1.72s (± 0.52%) ~ 1.71s 1.73s p=0.084 n=6
Check Time 3.06s (± 0.27%) 3.07s (± 0.27%) ~ 3.06s 3.08s p=0.666 n=6
Emit Time 0.09s (± 0.00%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=1.000 n=6
Total Time 8.88s (± 0.32%) 8.88s (± 0.17%) ~ 8.86s 8.90s p=0.936 n=6
Angular - node (v14.21.3, x64)
Memory used 360,052k (± 0.01%) 360,042k (± 0.02%) ~ 359,948k 360,120k p=0.810 n=6
Parse Time 3.67s (± 0.36%) 3.66s (± 0.70%) ~ 3.64s 3.71s p=0.252 n=6
Bind Time 1.21s (± 0.43%) 1.21s (± 0.69%) ~ 1.20s 1.22s p=0.533 n=6
Check Time 10.10s (± 0.32%) 10.05s (± 0.42%) ~ 9.99s 10.10s p=0.051 n=6
Emit Time 8.41s (± 0.58%) 8.34s (± 0.22%) -0.06s (- 0.75%) 8.32s 8.36s p=0.028 n=6
Total Time 23.40s (± 0.28%) 23.27s (± 0.27%) -0.13s (- 0.55%) 23.19s 23.36s p=0.008 n=6
Compiler-Unions - node (v14.21.3, x64)
Memory used 188,133k (± 0.01%) 188,118k (± 0.02%) ~ 188,078k 188,155k p=0.470 n=6
Parse Time 1.63s (± 0.60%) 1.62s (± 0.46%) ~ 1.61s 1.63s p=0.167 n=6
Bind Time 0.84s (± 0.61%) 0.84s (± 0.48%) ~ 0.84s 0.85s p=0.595 n=6
Check Time 10.32s (± 0.70%) 10.26s (± 0.45%) ~ 10.21s 10.33s p=0.199 n=6
Emit Time 3.13s (± 0.89%) 3.12s (± 0.77%) ~ 3.10s 3.16s p=0.465 n=6
Total Time 15.92s (± 0.44%) 15.85s (± 0.44%) ~ 15.75s 15.93s p=0.127 n=6
Monaco - node (v14.21.3, x64)
Memory used 341,179k (± 0.01%) 341,169k (± 0.00%) ~ 341,161k 341,175k p=0.936 n=6
Parse Time 2.80s (± 0.61%) 2.81s (± 0.66%) ~ 2.79s 2.83s p=0.370 n=6
Bind Time 1.12s (± 0.80%) 1.11s (± 0.47%) -0.01s (- 1.19%) 1.10s 1.11s p=0.020 n=6
Check Time 8.18s (± 0.66%) 8.17s (± 0.46%) ~ 8.13s 8.23s p=0.747 n=6
Emit Time 4.69s (± 0.55%) 4.67s (± 0.43%) ~ 4.65s 4.70s p=0.293 n=6
Total Time 16.79s (± 0.51%) 16.76s (± 0.18%) ~ 16.72s 16.80s p=0.872 n=6
TFS - node (v14.21.3, x64)
Memory used 295,299k (± 0.00%) 295,303k (± 0.00%) ~ 295,293k 295,320k p=0.574 n=6
Parse Time 2.40s (± 0.94%) 2.39s (± 0.70%) ~ 2.36s 2.40s p=0.738 n=6
Bind Time 1.07s (± 0.51%) 1.06s (± 0.49%) ~ 1.06s 1.07s p=0.640 n=6
Check Time 7.67s (± 0.56%) 7.64s (± 0.39%) ~ 7.61s 7.69s p=0.196 n=6
Emit Time 4.30s (± 0.38%) 4.27s (± 0.66%) ~ 4.25s 4.33s p=0.063 n=6
Total Time 15.42s (± 0.21%) 15.36s (± 0.33%) -0.06s (- 0.39%) 15.30s 15.42s p=0.043 n=6
material-ui - node (v14.21.3, x64)
Memory used 477,113k (± 0.00%) 477,116k (± 0.00%) ~ 477,100k 477,137k p=0.810 n=6
Parse Time 3.35s (± 0.45%) 3.34s (± 0.52%) ~ 3.32s 3.37s p=0.291 n=6
Bind Time 1.00s (± 0.51%) 1.00s (± 0.41%) ~ 1.00s 1.01s p=0.595 n=6
Check Time 18.88s (± 0.48%) 18.85s (± 0.16%) ~ 18.80s 18.88s p=0.630 n=6
Emit Time 0.00s (± 0.00%) 0.00s (± 0.00%) ~ 0.00s 0.00s p=1.000 n=6
Total Time 23.23s (± 0.42%) 23.18s (± 0.14%) ~ 23.13s 23.21s p=0.419 n=6
xstate - node (v14.21.3, x64)
Memory used 550,709k (± 0.00%) 550,705k (± 0.00%) ~ 550,677k 550,733k p=0.810 n=6
Parse Time 4.25s (± 0.32%) 4.23s (± 0.51%) ~ 4.21s 4.26s p=0.371 n=6
Bind Time 1.68s (± 1.13%) 1.67s (± 0.83%) ~ 1.64s 1.68s p=0.220 n=6
Check Time 3.15s (± 0.71%) 3.14s (± 0.72%) ~ 3.12s 3.18s p=0.519 n=6
Emit Time 0.09s (± 4.45%) 0.09s (± 0.00%) ~ 0.09s 0.09s p=0.405 n=6
Total Time 9.17s (± 0.42%) 9.13s (± 0.26%) ~ 9.10s 9.16s p=0.064 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Angular - node (v18.10.0, x64)
  • Angular - node (v16.17.1, x64)
  • Angular - node (v14.21.3, x64)
  • Compiler-Unions - node (v18.10.0, x64)
  • Compiler-Unions - node (v16.17.1, x64)
  • Compiler-Unions - node (v14.21.3, x64)
  • Monaco - node (v18.10.0, x64)
  • Monaco - node (v16.17.1, x64)
  • Monaco - node (v14.21.3, x64)
  • TFS - node (v18.10.0, x64)
  • TFS - node (v16.17.1, x64)
  • TFS - node (v14.21.3, x64)
  • material-ui - node (v18.10.0, x64)
  • material-ui - node (v16.17.1, x64)
  • material-ui - node (v14.21.3, x64)
  • xstate - node (v18.10.0, x64)
  • xstate - node (v16.17.1, x64)
  • xstate - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54656 6
Baseline main 6

TSServer

Comparison Report - main..54656
Metric main 54656 Delta Best Worst p-value
Compiler-UnionsTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,567ms (± 0.66%) 2,551ms (± 0.35%) ~ 2,534ms 2,558ms p=0.078 n=6
Req 2 - geterr 5,330ms (± 0.48%) 5,332ms (± 0.42%) ~ 5,297ms 5,363ms p=0.872 n=6
Req 3 - references 340ms (± 0.71%) 340ms (± 1.32%) ~ 337ms 349ms p=0.679 n=6
Req 4 - navto 287ms (± 0.31%) 287ms (± 0.42%) ~ 286ms 289ms p=0.676 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 84ms (± 0.89%) 84ms (± 2.47%) ~ 80ms 86ms p=0.867 n=6
CompilerTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 2,633ms (± 1.28%) 2,657ms (± 1.36%) ~ 2,616ms 2,710ms p=0.575 n=6
Req 2 - geterr 4,100ms (± 0.42%) 4,077ms (± 0.36%) -23ms (- 0.56%) 4,060ms 4,104ms p=0.030 n=6
Req 3 - references 347ms (± 0.59%) 347ms (± 0.35%) ~ 345ms 348ms p=0.622 n=6
Req 4 - navto 287ms (± 0.68%) 287ms (± 0.28%) ~ 286ms 288ms p=0.796 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 66ms (± 3.81%) 64ms (± 2.17%) ~ 62ms 66ms p=0.162 n=6
xstateTSServer - node (v18.10.0, x64)
Req 1 - updateOpen 3,087ms (± 0.67%) 3,086ms (± 0.53%) ~ 3,067ms 3,109ms p=0.873 n=6
Req 2 - geterr 1,571ms (± 1.54%) 1,553ms (± 1.31%) ~ 1,530ms 1,584ms p=0.199 n=6
Req 3 - references 114ms (± 1.36%) 114ms (± 1.88%) ~ 112ms 118ms p=0.739 n=6
Req 4 - navto 368ms (± 0.40%) 368ms (± 0.23%) ~ 366ms 368ms p=0.867 n=6
Req 5 - completionInfo count 2,870 (± 0.00%) 2,870 (± 0.00%) ~ 2,870 2,870 p=1.000 n=6
Req 5 - completionInfo 372ms (± 1.70%) 375ms (± 2.44%) ~ 365ms 386ms p=0.628 n=6
Compiler-UnionsTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,652ms (± 1.09%) 2,631ms (± 0.52%) ~ 2,613ms 2,648ms p=0.261 n=6
Req 2 - geterr 6,030ms (± 0.66%) 5,995ms (± 0.72%) ~ 5,956ms 6,070ms p=0.128 n=6
Req 3 - references 354ms (± 0.83%) 352ms (± 0.42%) ~ 350ms 354ms p=0.226 n=6
Req 4 - navto 285ms (± 0.85%) 288ms (± 1.52%) ~ 283ms 293ms p=0.373 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 89ms (± 8.75%) 93ms (± 0.56%) ~ 92ms 93ms p=0.070 n=6
CompilerTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 2,829ms (± 0.50%) 2,833ms (± 0.45%) ~ 2,815ms 2,851ms p=0.688 n=6
Req 2 - geterr 4,676ms (± 0.13%) 4,660ms (± 0.32%) -16ms (- 0.35%) 4,633ms 4,672ms p=0.030 n=6
Req 3 - references 363ms (± 0.64%) 363ms (± 0.64%) ~ 360ms 366ms p=0.809 n=6
Req 4 - navto 283ms (± 1.16%) 283ms (± 0.47%) ~ 281ms 285ms p=1.000 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 67ms (± 1.46%) 67ms (± 0.61%) ~ 66ms 67ms p=0.487 n=6
xstateTSServer - node (v16.17.1, x64)
Req 1 - updateOpen 3,236ms (± 0.82%) 3,225ms (± 0.31%) ~ 3,213ms 3,241ms p=0.630 n=6
Req 2 - geterr 1,729ms (± 0.76%) 1,725ms (± 0.93%) ~ 1,711ms 1,746ms p=0.294 n=6
Req 3 - references 125ms (± 5.60%) 124ms (± 0.85%) ~ 122ms 125ms p=0.251 n=6
Req 4 - navto 351ms (± 0.43%) 349ms (± 0.33%) -2ms (- 0.62%) 348ms 351ms p=0.032 n=6
Req 5 - completionInfo count 2,870 (± 0.00%) 2,870 (± 0.00%) ~ 2,870 2,870 p=1.000 n=6
Req 5 - completionInfo 413ms (± 1.98%) 411ms (± 2.00%) ~ 399ms 418ms p=0.872 n=6
Compiler-UnionsTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,810ms (± 0.43%) 2,779ms (± 0.79%) -31ms (- 1.10%) 2,747ms 2,802ms p=0.016 n=6
Req 2 - geterr 6,189ms (± 0.20%) 6,175ms (± 0.71%) ~ 6,126ms 6,236ms p=0.378 n=6
Req 3 - references 363ms (± 1.41%) 360ms (± 0.79%) ~ 357ms 365ms p=0.258 n=6
Req 4 - navto 291ms (± 0.40%) 291ms (± 0.40%) ~ 290ms 293ms p=1.000 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 104ms (± 0.50%) 101ms (± 5.82%) ~ 93ms 105ms p=0.933 n=6
CompilerTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 2,981ms (± 0.65%) 2,971ms (± 0.54%) ~ 2,955ms 2,988ms p=0.575 n=6
Req 2 - geterr 4,565ms (± 2.02%) 4,539ms (± 0.32%) ~ 4,514ms 4,552ms p=0.936 n=6
Req 3 - references 376ms (± 0.85%) 376ms (± 0.35%) ~ 374ms 378ms p=0.459 n=6
Req 4 - navto 298ms (± 0.47%) 297ms (± 0.63%) ~ 294ms 299ms p=0.683 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 (± 8.12%) 76ms (± 1.54%) ~ 74ms 77ms p=0.241 n=6
xstateTSServer - node (v14.21.3, x64)
Req 1 - updateOpen 3,495ms (± 1.02%) 3,481ms (± 0.62%) ~ 3,444ms 3,505ms p=0.297 n=6
Req 2 - geterr 1,833ms (± 0.93%) 1,829ms (± 0.38%) ~ 1,819ms 1,840ms p=0.936 n=6
Req 3 - references 145ms (± 5.68%) 151ms (± 6.86%) ~ 138ms 160ms p=0.332 n=6
Req 4 - navto 403ms (± 1.11%) 401ms (± 1.38%) ~ 394ms 406ms p=0.255 n=6
Req 5 - completionInfo count 2,870 (± 0.00%) 2,870 (± 0.00%) ~ 2,870 2,870 p=1.000 n=6
Req 5 - completionInfo 435ms (± 2.54%) 437ms (± 1.50%) ~ 424ms 443ms p=0.686 n=6
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Hosts
  • node (v18.10.0, x64)
  • node (v16.17.1, x64)
  • node (v14.21.3, x64)
Scenarios
  • Compiler-UnionsTSServer - node (v18.10.0, x64)
  • Compiler-UnionsTSServer - node (v16.17.1, x64)
  • Compiler-UnionsTSServer - node (v14.21.3, x64)
  • CompilerTSServer - node (v18.10.0, x64)
  • CompilerTSServer - node (v16.17.1, x64)
  • CompilerTSServer - node (v14.21.3, x64)
  • xstateTSServer - node (v18.10.0, x64)
  • xstateTSServer - node (v16.17.1, x64)
  • xstateTSServer - node (v14.21.3, x64)
Benchmark Name Iterations
Current 54656 6
Baseline main 6

Startup

Comparison Report - main..54656
Metric main 54656 Delta Best Worst p-value
tsc-startup - node (v16.17.1, x64)
Execution time 143.15ms (± 0.19%) 142.70ms (± 0.17%) -0.45ms (- 0.31%) 142.07ms 145.13ms p=0.000 n=600
tsserver-startup - node (v16.17.1, x64)
Execution time 223.30ms (± 0.39%) 221.99ms (± 0.16%) -1.31ms (- 0.59%) 221.04ms 229.66ms p=0.000 n=600
tsserverlibrary-startup - node (v16.17.1, x64)
Execution time 227.22ms (± 0.31%) 223.47ms (± 0.13%) -3.75ms (- 1.65%) 222.72ms 227.79ms p=0.000 n=600
typescript-startup - node (v16.17.1, x64)
Execution time 207.38ms (± 0.37%) 205.40ms (± 0.17%) -1.98ms (- 0.96%) 204.57ms 211.05ms p=0.000 n=600
System
Machine Namets-ci-ubuntu
Platformlinux 5.4.0-148-generic
Architecturex64
Available Memory16 GB
Available Memory15 GB
CPUs4 × Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
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 54656 6
Baseline main 6

Developer Information:

Download Benchmark

@DanielRosenwasser DanielRosenwasser merged commit 38a4ced into microsoft:main Jun 26, 2023
@DanielRosenwasser
Copy link
Member

@typescript-bot cherry-pick this to release-5.1

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jun 26, 2023

Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into release-5.1 on this PR at 4c2bcc9. You can monitor the build here.

@typescript-bot
Copy link
Collaborator

Hey @DanielRosenwasser, I've opened #54782 for you.

typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this pull request Jun 26, 2023
Component commits:
1d77caa fix: no variable suggestions without semicolon

9c87f3a tests!

f67c9a3 lint

862807b make sure parameter takes priority

4c2bcc9 better formatting
DanielRosenwasser pushed a commit that referenced this pull request Jun 26, 2023
…e-5.1 (#54782)

Co-authored-by: Vitaly Turovsky <vital2580@icloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code comlpetion not working for variables
5 participants