diff options
| author | Micha White <botahamec@outlook.com> | 2023-02-13 17:46:04 -0500 |
|---|---|---|
| committer | Micha White <botahamec@outlook.com> | 2023-02-13 17:46:04 -0500 |
| commit | a0fc4c9d826034363c7418e363d3ab3ae7249fea (patch) | |
| tree | aada189468f5eff7ad1420bfb312e1a4b8323d97 /tvg | |
| parent | 41918e7efd1a58cb63a4e8b9aa1f8946cd75ba9d (diff) | |
Add benchmarking to the test
Diffstat (limited to 'tvg')
| -rw-r--r-- | tvg/tests/parse.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tvg/tests/parse.rs b/tvg/tests/parse.rs index 46515d2..017ea2c 100644 --- a/tvg/tests/parse.rs +++ b/tvg/tests/parse.rs @@ -8,7 +8,12 @@ fn main() { let entry = entry.unwrap().file_name(); let entry = entry.to_string_lossy(); let mut file = File::open(format!("./tests/examples/tvg/{}", &entry)).unwrap(); + let start = std::time::Instant::now(); let _: TvgFile<Rgba16> = TvgFile::read_from(&mut file).unwrap(); - println!("{:?} succeeded!", entry); + println!( + "{:?} successfully pased in {} seconds!", + entry, + start.elapsed().as_secs_f32() + ); } } |
