Show actual bytes values instead of MB conversion

- Removed MB conversion in run_all.sh
- Now displays actual bytes values from memory profiling
- Updated output to show 'bytes avg / bytes peak'
- More accurate representation of memory usage
- Consistent with timeline data which is already in bytes
This commit is contained in:
Ein Anderssono
2026-04-23 09:55:11 +02:00
parent c4d5ed0500
commit 09d6009074
101 changed files with 1140 additions and 950 deletions
+2 -6
View File
@@ -182,16 +182,12 @@ run_program() {
local avg_time=$((total_time / 3))
local avg_memory=$((total_memory / 3))
local avg_cpu=$((total_cpu / 3))
# Convert memory to MB for display
local avg_memory_mb=$((avg_memory / 1024))
local peak_memory_mb=$((peak_memory / 1024))
if [ $success_count -eq 3 ]; then
echo -e "${GREEN}SUCCESS${NC} $avg_time ms, ${BLUE}${avg_memory_mb}MB avg / ${peak_memory_mb}MB peak, ${YELLOW}${avg_cpu}% CPU avg / ${peak_cpu}% CPU peak${NC}"
echo -e "${GREEN}SUCCESS${NC} $avg_time ms, ${BLUE}${avg_memory} bytes avg / ${YELLOW}${peak_memory} bytes peak, ${YELLOW}${avg_cpu}% CPU avg / ${peak_cpu}% CPU peak${NC}"
results+=("$avg_time $name SUCCESS $avg_memory $peak_memory $avg_cpu $peak_cpu")
else
echo -e "${RED}FAILED${NC} $avg_time ms, ${BLUE}${avg_memory_mb}MB avg / ${peak_memory_mb}MB peak, ${YELLOW}${avg_cpu}% CPU avg / ${peak_cpu}% CPU peak${NC}"
echo -e "${RED}FAILED${NC} $avg_time ms, ${BLUE}${avg_memory} bytes avg / ${YELLOW}${peak_memory} bytes peak, ${YELLOW}${avg_cpu}% CPU avg / ${peak_cpu}% CPU peak${NC}"
results+=("$avg_time $name FAILED $avg_memory $peak_memory $avg_cpu $peak_cpu")
fi
}