#!/usr/bin/env ion
cargo run --bin sn -- sort -t1M
cargo run --bin sn -- fat
cargo run --bin sn -- sort src/ # to make sure non-ascii displays correctly
cargo build --release

let binpath = target/release/sn

# set to a suitable path
let path = /home/vanessa/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

#do the actual benchmarks
let benches = ["sn par $path" "$binpath par $path" "sn all $path" "$binpath all $path" "sn sort $path" "$binpath sort $path" "sn ar $path" "$binpath ar $path"]
bench @benches
