mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 14:57:03 +00:00
The mandelbrot benchmark can now be used to benchmark concurrency support
using either spawn or spawn_native. As before it can also use no
parallelism or the parallel conjunction operator.
benchmarks/progs/mandelbrot/mandelbrot.m:
As above.
benchmarks/progs/mandelbrot/bench.sh:
Update mandelbrot benchmarking script
26 lines
516 B
Bash
Executable File
26 lines
516 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
TIME_CMD="time -a -v"
|
|
#REPS=25
|
|
REPS=10
|
|
|
|
# Kill a process if it uses more than 3GB of memory.
|
|
MEMORY=$((3*1024*1024*1024))
|
|
ulimit -S -m $MEMORY -v $MEMORY
|
|
|
|
for PROGRAM in "$@"; do
|
|
for MODE in no spawn_native spawn conj; do
|
|
echo Testing $PROGRAM -p $MODE
|
|
LOG=${PROGRAM}_${MODE}.log
|
|
rm -f $LOG
|
|
for ((I=0; I<$REPS; I++)); do
|
|
echo Rep: $I
|
|
echo Rep: $I >> $LOG
|
|
$TIME_CMD -o $LOG ./$PROGRAM -p $MODE
|
|
done
|
|
done
|
|
done
|
|
|