From 3bbaced086f1e9213cb4e42a98abd6a7ab0f944a Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Sun, 25 Aug 2019 00:02:55 -0400 Subject: [PATCH] Add parse timing info --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 86d79e2..d2a6c02 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,7 @@ use std::fs::File; use std::io::Read; use std::path::Path; +use std::time::SystemTime; use clap::{App, Arg}; @@ -34,7 +35,9 @@ fn main() { let mut buf = Vec::new(); file.read_to_end(&mut buf).expect(&format!("Unable to read file={}", path.display())); + let start = SystemTime::now(); for _payload in IexParser::new(&buf[..]) { //dbg!(payload); } + println!("Parse time seconds={}", SystemTime::now().duration_since(start).unwrap().as_secs()) }