From 9b73f809596e955216dde24fcf921d6985a1a767 Mon Sep 17 00:00:00 2001 From: Sergey Parilin Date: Tue, 2 Apr 2019 17:52:04 +0300 Subject: PR issuse resolved --- crates/ra_cli/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/ra_cli/src/main.rs') diff --git a/crates/ra_cli/src/main.rs b/crates/ra_cli/src/main.rs index 5285f1f28..c13c7910c 100644 --- a/crates/ra_cli/src/main.rs +++ b/crates/ra_cli/src/main.rs @@ -1,6 +1,6 @@ mod analysis_stats; -use std::{fs, io::Read, path::Path, time::Instant}; +use std::{fs, io::Read, path::Path}; use clap::{App, Arg, SubCommand}; use join_to_string::join; @@ -9,6 +9,7 @@ use ra_ide_api_light::file_structure; use ra_syntax::{SourceFile, TextRange, TreeArc, AstNode}; use tools::collect_tests; use flexi_logger::Logger; +use ra_prof::profile; type Result = ::std::result::Result; @@ -34,13 +35,11 @@ fn main() -> Result<()> { .get_matches(); match matches.subcommand() { ("parse", Some(matches)) => { - let start = Instant::now(); + let _p = profile("parsing"); let file = file()?; - let elapsed = start.elapsed(); if !matches.is_present("no-dump") { println!("{}", file.syntax().debug_dump()); } - eprintln!("parsing: {:?}", elapsed); ::std::mem::forget(file); } ("symbols", _) => { -- cgit v1.2.3