mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Add Item change to the set of benches
This commit is contained in:
parent
000d1db351
commit
3902e5574c
1 changed files with 13 additions and 0 deletions
|
@ -134,6 +134,19 @@ fn do_work<F: Fn(&Analysis) -> T, T>(host: &mut AnalysisHost, file_id: FileId, w
|
|||
work(&host.analysis());
|
||||
eprintln!("{:?}", start.elapsed());
|
||||
}
|
||||
{
|
||||
let start = Instant::now();
|
||||
eprint!("item change: ");
|
||||
{
|
||||
let mut text = host.analysis().file_text(file_id).unwrap().to_string();
|
||||
text.push_str("\npub fn _dummy() {}\n");
|
||||
let mut change = AnalysisChange::new();
|
||||
change.change_file(file_id, Some(Arc::new(text)));
|
||||
host.apply_change(change);
|
||||
}
|
||||
work(&host.analysis());
|
||||
eprintln!("{:?}", start.elapsed());
|
||||
}
|
||||
{
|
||||
let start = Instant::now();
|
||||
eprint!("const change: ");
|
||||
|
|
Loading…
Reference in a new issue