diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-08-12 15:36:01 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-08-12 15:36:01 +0100 |
commit | 147547e7b85e80e2e30aa1a5ba4d9d0969908398 (patch) | |
tree | c39749d1b71b73b4017c2d0d848ebdc85e570c39 /crates/ra_ide_db/src/change.rs | |
parent | 6be5ab02008b442c85c201968b97f24f13c4692e (diff) | |
parent | 208b7bd7ba687fb570feb1b89219f14c63712ce8 (diff) |
Merge #5724
5724: Rename ra_prof -> profile
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_db/src/change.rs')
-rw-r--r-- | crates/ra_ide_db/src/change.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide_db/src/change.rs b/crates/ra_ide_db/src/change.rs index b13df8b85..7a4e04ca9 100644 --- a/crates/ra_ide_db/src/change.rs +++ b/crates/ra_ide_db/src/change.rs | |||
@@ -3,11 +3,11 @@ | |||
3 | 3 | ||
4 | use std::{fmt, sync::Arc, time}; | 4 | use std::{fmt, sync::Arc, time}; |
5 | 5 | ||
6 | use profile::{memory_usage, Bytes}; | ||
6 | use ra_db::{ | 7 | use ra_db::{ |
7 | salsa::{Database, Durability, SweepStrategy}, | 8 | salsa::{Database, Durability, SweepStrategy}, |
8 | CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, | 9 | CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, |
9 | }; | 10 | }; |
10 | use ra_prof::{memory_usage, profile, Bytes}; | ||
11 | use rustc_hash::FxHashSet; | 11 | use rustc_hash::FxHashSet; |
12 | 12 | ||
13 | use crate::{symbol_index::SymbolsDatabase, RootDatabase}; | 13 | use crate::{symbol_index::SymbolsDatabase, RootDatabase}; |
@@ -85,12 +85,12 @@ const GC_COOLDOWN: time::Duration = time::Duration::from_millis(100); | |||
85 | 85 | ||
86 | impl RootDatabase { | 86 | impl RootDatabase { |
87 | pub fn request_cancellation(&mut self) { | 87 | pub fn request_cancellation(&mut self) { |
88 | let _p = profile("RootDatabase::request_cancellation"); | 88 | let _p = profile::span("RootDatabase::request_cancellation"); |
89 | self.salsa_runtime_mut().synthetic_write(Durability::LOW); | 89 | self.salsa_runtime_mut().synthetic_write(Durability::LOW); |
90 | } | 90 | } |
91 | 91 | ||
92 | pub fn apply_change(&mut self, change: AnalysisChange) { | 92 | pub fn apply_change(&mut self, change: AnalysisChange) { |
93 | let _p = profile("RootDatabase::apply_change"); | 93 | let _p = profile::span("RootDatabase::apply_change"); |
94 | self.request_cancellation(); | 94 | self.request_cancellation(); |
95 | log::info!("apply_change {:?}", change); | 95 | log::info!("apply_change {:?}", change); |
96 | if let Some(roots) = change.roots { | 96 | if let Some(roots) = change.roots { |
@@ -141,7 +141,7 @@ impl RootDatabase { | |||
141 | return; | 141 | return; |
142 | } | 142 | } |
143 | 143 | ||
144 | let _p = profile("RootDatabase::collect_garbage"); | 144 | let _p = profile::span("RootDatabase::collect_garbage"); |
145 | self.last_gc = crate::wasm_shims::Instant::now(); | 145 | self.last_gc = crate::wasm_shims::Instant::now(); |
146 | 146 | ||
147 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); | 147 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); |