From 3792be48a3008c9cd04aba62230cfec1fb11a309 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sat, 11 Mar 2023 15:40:00 +0100 Subject: [PATCH] Timings --- schemsearch-cli/src/main.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/schemsearch-cli/src/main.rs b/schemsearch-cli/src/main.rs index a7d3f98..8841b0f 100644 --- a/schemsearch-cli/src/main.rs +++ b/schemsearch-cli/src/main.rs @@ -17,6 +17,7 @@ mod types; +use std::fmt::Debug; use std::fs::File; use std::io; use std::io::{BufWriter, Write}; @@ -158,6 +159,8 @@ fn main() { return; } + let start = std::time::Instant::now(); + let search_behavior = SearchBehavior { ignore_block_data: matches.get_flag("ignore-data"), ignore_block_entities: matches.get_flag("ignore-block-entities"), @@ -312,6 +315,9 @@ fn main() { } } } + + let end = std::time::Instant::now(); + println!("Finished in {:.2}s! Searched in {} Schematics", end.duration_since(start).as_secs_f32(), schematics.len()); } fn load_schem(schem_path: &PathBuf) -> Option {