#!/usr/bin/env ion

# set path to include sn
let PATH=$HOME/.cargo/bin:$PATH

#export CLICOLOR=0
let CLICOLOR=0

# set to a suitable path & decide whether to produce reports
let path = $HOME/programming
for x in @args[1..]
    if test -n $x
        let path = $x
    end
end


# set the benches
let benches = ["sn par $path" "sn all $path" "du -hacd2 $path" "sn par -d3 $path" "sn all -d3 $path" "du -hacd3 $path"]

# initialize cache
echo 'initializing file system cache...'
sn p $path > /dev/null

#do the actual benchmarks
bench @benches
