#!/usr/bin/env ion
let dir = src/testdata
cargo run -- sort -t200b $dir
cargo run -- fat $dir -t1k
cargo run -- sort $dir # to make sure non-ascii displays correctly
#cargo build --release

let binpath = target/release/sn

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

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

let benches = ["sn par $path" "$binpath par $path" "sn all $path" "$binpath all $path" "sn all $path --exclude target/debug" "$binpath all $path --exclude target/debug" "sn ar $path" "$binpath ar $path"]
bench @benches
