awooter: simple time measurement

This commit is contained in:
Lofty 2022-11-26 22:16:28 +00:00
parent 2d3c05da85
commit 1cc00308dc

View File

@ -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;