From 1cc00308dca1752625b6e63c3600fb27fd5bf9ca Mon Sep 17 00:00:00 2001 From: Lofty Date: Sat, 26 Nov 2022 22:16:28 +0000 Subject: [PATCH] awooter: simple time measurement --- common/route/awooter/rust/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/route/awooter/rust/src/lib.rs b/common/route/awooter/rust/src/lib.rs index c50ee828..c5499b8b 100644 --- a/common/route/awooter/rust/src/lib.rs +++ b/common/route/awooter/rust/src/lib.rs @@ -1,7 +1,7 @@ use std::{ collections::HashMap, ptr::NonNull, - sync::{atomic::AtomicUsize, Mutex, RwLock}, + sync::{atomic::AtomicUsize, Mutex, RwLock}, time::Instant, }; use colored::Colorize; @@ -743,9 +743,15 @@ fn route(ctx: &mut npnr::Context) -> bool { rayon::current_num_threads().to_string().bold() ); + let start = Instant::now(); + let (x_part, y_part, ne, se, sw, nw) = find_partition_point(ctx, &nets, pips, 0, ctx.grid_dim_x(), 0, ctx.grid_dim_y()); + let time = Instant::now() - start; + + log_info!("Partitioning took {:.2}s\n", time.as_secs_f32()); + let mut invalid_arcs_in_ne = 0; let mut invalid_arcs_in_se = 0; let mut invalid_arcs_in_sw = 0;