aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_prof
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-04-10 20:16:32 +0100
committerGitHub <[email protected]>2020-04-10 20:16:32 +0100
commitca9a5dd1654cc0d54ed5b2bb71ec8ed559470276 (patch)
treebba0a2507861fd9c4e354283e2b2102532747e7e /crates/ra_prof
parent773bb5173d3d54e6d19dfadd75c342c7acdce287 (diff)
parent1b68c72fe93424213db895a4066eafb99dfdeac9 (diff)
Merge #3933
3933: Fix accidently quadratic behavior when processing include! r=matklad a=matklad This fixes the immediate problem behind #3927. It doesn't yet fix the deeper problem with `to_node` being quadratic (hence the test is ignored), but it is a good start anyway. bors r+ Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_prof')
-rw-r--r--crates/ra_prof/src/lib.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/crates/ra_prof/src/lib.rs b/crates/ra_prof/src/lib.rs
index 00ea3a9b0..2d4f68f5e 100644
--- a/crates/ra_prof/src/lib.rs
+++ b/crates/ra_prof/src/lib.rs
@@ -113,21 +113,6 @@ pub fn profile(label: Label) -> Profiler {
113 }) 113 })
114} 114}
115 115
116pub fn print_time(label: Label) -> impl Drop {
117 struct Guard {
118 label: Label,
119 start: Instant,
120 }
121
122 impl Drop for Guard {
123 fn drop(&mut self) {
124 eprintln!("{}: {:?}", self.label, self.start.elapsed())
125 }
126 }
127
128 Guard { label, start: Instant::now() }
129}
130
131pub struct Profiler { 116pub struct Profiler {
132 label: Option<Label>, 117 label: Option<Label>,
133 detail: Option<String>, 118 detail: Option<String>,