From f81fbb8d25df69b8cd28e389bd5a828bc291c483 Mon Sep 17 00:00:00 2001 From: Ein Anderssono Date: Thu, 23 Apr 2026 01:41:07 +0200 Subject: [PATCH] Change sampling interval to 1ms for better accuracy - Changed from 10ms to 1ms sampling interval - Better captures data for fast programs - Memory already sampled in bytes for consistency - Will provide more detailed timeline data --- run_all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_all.sh b/run_all.sh index caabec9..bd026bc 100755 --- a/run_all.sh +++ b/run_all.sh @@ -78,7 +78,7 @@ profile_resources() { > "$cpu_output_file" > "$timeline_file" - # Sample resources every 10ms while process is running + # Sample resources every 1ms while process is running while kill -0 "$pid" 2>/dev/null; do current_mem=$(get_memory_usage "$pid") current_cpu=$(get_cpu_usage "$pid") @@ -98,7 +98,7 @@ profile_resources() { echo "$elapsed_ms $current_mem $current_cpu" >> "$timeline_file" sample_count=$((sample_count + 1)) - sleep 0.01 2>/dev/null || sleep 0.1 + sleep 0.001 2>/dev/null || sleep 0.01 done echo "$peak_mem $peak_cpu $sample_count"