#!/usr/bin/fish

# Run the initial samples in parallel.
seq 0 184 | xargs -n 1 -P 0 ./sample.fish | tee log

# Run the last few samples serially to conserve memory.
seq 185 209 | xargs -n 1 -P 1 ./sample.fish | tee -a log

# Average the samples for each number of iterations.
awk '{t[$1]+=$3;m[$1]+=$4/1024;n[$1]++}END{for(i in n)print i,t[i]/n[i],m[i]/n[i]}' log >logproc

# Plot the results.
python plot.py
