mirror of
https://github.com/speice-io/marketdata-shootout
synced 2024-12-22 06:38:30 -05:00
Add parse timing info
This commit is contained in:
parent
ac9914be3c
commit
3bbaced086
@ -1,6 +1,7 @@
|
|||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::Read;
|
use std::io::Read;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::time::SystemTime;
|
||||||
|
|
||||||
use clap::{App, Arg};
|
use clap::{App, Arg};
|
||||||
|
|
||||||
@ -34,7 +35,9 @@ fn main() {
|
|||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
file.read_to_end(&mut buf).expect(&format!("Unable to read file={}", path.display()));
|
file.read_to_end(&mut buf).expect(&format!("Unable to read file={}", path.display()));
|
||||||
|
|
||||||
|
let start = SystemTime::now();
|
||||||
for _payload in IexParser::new(&buf[..]) {
|
for _payload in IexParser::new(&buf[..]) {
|
||||||
//dbg!(payload);
|
//dbg!(payload);
|
||||||
}
|
}
|
||||||
|
println!("Parse time seconds={}", SystemTime::now().duration_since(start).unwrap().as_secs())
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user