Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Auto merge of #1244 - Xanewok:translate-tests, r=alexheretic
Browse files Browse the repository at this point in the history
Translate cmd tests to use async LSP client

This translates our cmd-based tests to use the LSP client introduced in #1223.

Some anecdotal benchmarks (Xubuntu 18.04, Ryzen 2600) before and after translating:
```
$ time cargo test cmd_
real    0m3,498s
user    0m8,379s
sys     0m2,710s

$ time cargo test cmd_ --release
real    0m3,059s
user    0m5,585s
sys     0m2,512s

$ time cargo test client_
real    0m3,465s
user    0m7,197s
sys     0m1,926s

$ time cargo test client_ --release
real    0m3,053s
user    0m4,977s
sys     0m1,825s
```
It seems that synchronization overhead caused by running multiple RLS and rustc instances in-process still outweighs spawning separate processes per test 🎉 That means we don't lose performance (and actually benefit) from switching over.

I plan on translating the remaining tests in tests_old as a separate PR.

r? @alexheretic
  • Loading branch information
bors committed Jan 22, 2019
2 parents 41bc0bf + 663e437 commit 968129d
Show file tree
Hide file tree
Showing 5 changed files with 1,104 additions and 1,560 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ rustc-workspace-hack = "1.0.0"
[dev-dependencies]
difference = "2"
tempfile = "3"
lsp-codec = "0.1"
lsp-codec = "0.1.1"
tokio = "0.1"
futures = "0.1"
tokio-process = "0.2"
Expand Down
Loading

0 comments on commit 968129d

Please sign in to comment.