Use tmpfs for running benchmarks

This commit is contained in:
Siarhei Fedartsou 2024-06-22 18:57:46 +02:00
parent 3d6d671556
commit b19cf119b2
2 changed files with 584 additions and 585 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,13 +40,12 @@ function measure_peak_ram_and_time {
# on macOS time has different parameters, so simply run command on macOS
$COMMAND > /dev/null 2>&1
else
$COMMAND
# OUTPUT=$(/usr/bin/time -f "%e %M" $COMMAND 2>&1 | tail -n 1)
OUTPUT=$(/usr/bin/time -f "%e %M" $COMMAND 2>&1 | tail -n 1)
# TIME=$(echo $OUTPUT | awk '{print $1}')
# PEAK_RAM_KB=$(echo $OUTPUT | awk '{print $2}')
# PEAK_RAM_MB=$(echo "scale=2; $PEAK_RAM_KB / 1024" | bc)
# echo "Time: ${TIME}s Peak RAM: ${PEAK_RAM_MB}MB" > $OUTPUT_FILE
TIME=$(echo $OUTPUT | awk '{print $1}')
PEAK_RAM_KB=$(echo $OUTPUT | awk '{print $2}')
PEAK_RAM_MB=$(echo "scale=2; $PEAK_RAM_KB / 1024" | bc)
echo "Time: ${TIME}s Peak RAM: ${PEAK_RAM_MB}MB" > $OUTPUT_FILE
fi
}