From 7622c750648fe5453e83f7fa57e73732eb699638 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Mon, 17 Feb 2020 19:05:22 +0100 Subject: [PATCH] blocking: opt-out CPUs auto-detection in debug mode (#807) This tweaks the tokio runtime checker (only used in debug mode) in order to use a single thread. Performing the CPUs auto-detection step on each check adds significant syscall-tracing noise and runtime latency. This completely skips it. --- src/blocking/wait.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/blocking/wait.rs b/src/blocking/wait.rs index 685572a..cfca8da 100644 --- a/src/blocking/wait.rs +++ b/src/blocking/wait.rs @@ -68,6 +68,7 @@ fn enter() { #[cfg(debug_assertions)] { tokio::runtime::Builder::new() + .core_threads(1) .build() .expect("build shell runtime") .enter(|| {});