Only prefill caches in the completion benchmark

This commit is contained in:
Kirill Bulatov
2021-06-11 09:27:25 +03:00
parent b24f816c0d
commit 339448157c
5 changed files with 21 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ pub fn apply_ssr_rules(rules: Vec<SsrRule>) -> Result<()> {
load_out_dirs_from_check: true,
wrap_rustc: false,
with_proc_macro: true,
prefill_caches: false,
};
let (host, vfs, _proc_macro) =
load_workspace_at(&std::env::current_dir()?, &cargo_config, &load_cargo_config, &|_| {})?;
@@ -39,8 +40,12 @@ pub fn search_for_patterns(patterns: Vec<SsrPattern>, debug_snippet: Option<Stri
use ide_db::base_db::SourceDatabaseExt;
use ide_db::symbol_index::SymbolsDatabase;
let cargo_config = Default::default();
let load_cargo_config =
LoadCargoConfig { load_out_dirs_from_check: true, wrap_rustc: true, with_proc_macro: true };
let load_cargo_config = LoadCargoConfig {
load_out_dirs_from_check: true,
wrap_rustc: true,
with_proc_macro: true,
prefill_caches: false,
};
let (host, _vfs, _proc_macro) =
load_workspace_at(&std::env::current_dir()?, &cargo_config, &load_cargo_config, &|_| {})?;
let db = host.raw_database();