From 8105c14454f8c4f575f16b44ec616ffd045be57f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 22:14:56 +0300 Subject: Improve debug_dump performance --- cli/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli') diff --git a/cli/src/main.rs b/cli/src/main.rs index ad7119533..707fbd94c 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -33,9 +33,7 @@ fn main() -> Result<()> { .get_matches(); match matches.subcommand() { ("parse", _) => { - let start = Instant::now(); let tree = parse()?; - eprintln!("elapsed {:?}", start.elapsed()); println!("{}", tree); } ("render-test", Some(matches)) => { @@ -53,7 +51,9 @@ fn main() -> Result<()> { fn parse() -> Result { let text = read_stdin()?; + let start = Instant::now(); let file = libsyntax2::parse(text); + eprintln!("elapsed {:?}", start.elapsed()); let tree = libsyntax2::utils::dump_tree(&file); Ok(tree) } -- cgit v1.2.3