From f8f57ee4891bde3b9e7469f8f1f2c0b17ec85ec8 Mon Sep 17 00:00:00 2001 From: Kye Date: Tue, 27 Feb 2024 19:08:21 -0800 Subject: [PATCH] [CLEANP] --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index aff411b3..50781398 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,7 @@ use std::fs; use std::time::Instant; // Define the new execute function -fn execute(script_path: &str, threads: usize) -> PyResult<()> { +fn exec_concurrently(script_path: &str, threads: usize) -> PyResult<()> { (0..threads).into_par_iter().for_each(|_| { Python::with_gil(|py| { let sys = py.import("sys").unwrap(); @@ -47,7 +47,7 @@ fn main() -> PyResult<()> { let start = Instant::now(); // Call the execute function - execute(script_path, threads)?; + exec_concurrently(script_path, threads)?; let duration = start.elapsed(); match fs::write("/tmp/elapsed.time", format!("booting time: {:?}", duration)) {