summaryrefslogtreecommitdiff
path: root/cli/bench/lsp.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-05-26 02:10:18 -0400
committerGitHub <noreply@github.com>2023-05-26 08:10:18 +0200
commit25cbd97ab7ef1866e58238f1c28ec0d86062aee8 (patch)
treed4c8e585f5cc0f8e66598df5be1747aa27ef5a36 /cli/bench/lsp.rs
parente95f098ae350f17450d06270ce37032688447f96 (diff)
chore(lsp/tests): diagnostic synchronization (reland) (#19270)
Merge on approval as it fixes the flaky test.
Diffstat (limited to 'cli/bench/lsp.rs')
-rw-r--r--cli/bench/lsp.rs20
1 files changed, 16 insertions, 4 deletions
diff --git a/cli/bench/lsp.rs b/cli/bench/lsp.rs
index 15f3ee762..a449c9350 100644
--- a/cli/bench/lsp.rs
+++ b/cli/bench/lsp.rs
@@ -40,7 +40,10 @@ struct FixtureMessage {
/// the end of the document and does a level of hovering and gets quick fix
/// code actions.
fn bench_big_file_edits(deno_exe: &Path) -> Duration {
- let mut client = LspClientBuilder::new().deno_exe(deno_exe).build();
+ let mut client = LspClientBuilder::new()
+ .use_diagnostic_sync(false)
+ .deno_exe(deno_exe)
+ .build();
client.initialize_default();
client.write_notification(
@@ -102,7 +105,10 @@ fn bench_big_file_edits(deno_exe: &Path) -> Duration {
}
fn bench_code_lens(deno_exe: &Path) -> Duration {
- let mut client = LspClientBuilder::new().deno_exe(deno_exe).build();
+ let mut client = LspClientBuilder::new()
+ .use_diagnostic_sync(false)
+ .deno_exe(deno_exe)
+ .build();
client.initialize_default();
client.write_notification(
@@ -152,7 +158,10 @@ fn bench_code_lens(deno_exe: &Path) -> Duration {
}
fn bench_find_replace(deno_exe: &Path) -> Duration {
- let mut client = LspClientBuilder::new().deno_exe(deno_exe).build();
+ let mut client = LspClientBuilder::new()
+ .use_diagnostic_sync(false)
+ .deno_exe(deno_exe)
+ .build();
client.initialize_default();
for i in 0..10 {
@@ -238,7 +247,10 @@ fn bench_find_replace(deno_exe: &Path) -> Duration {
/// A test that starts up the LSP, opens a single line document, and exits.
fn bench_startup_shutdown(deno_exe: &Path) -> Duration {
- let mut client = LspClientBuilder::new().deno_exe(deno_exe).build();
+ let mut client = LspClientBuilder::new()
+ .use_diagnostic_sync(false)
+ .deno_exe(deno_exe)
+ .build();
client.initialize_default();
client.write_notification(