#!/bin/bash # # Usage: # ./report.sh set -o nounset set -o pipefail set -o errexit source test/common.sh # log # TODO: Move stuff from osh-parser.sh, osh-runtime.sh, etc. # # stage1 : concatenate files from different machines # stage2 : make CSV files with report.R # stage3 : make HTML files. Call the 'print-report function here. proc stage2 { local base_dir=$1 # _tmp/{osh-parser,osh-runtime,...} local action=$[basename $base_dir] local out=$base_dir/stage2 mkdir -p $out benchmarks/report.R $action $base_dir/stage1 $out tree $out } proc stage3 { local base_dir=$1 # _tmp/{osh-parser,osh-runtime,...} local name=$[basename $base_dir] local script=benchmarks/$name.sh local out=$base_dir/index.html mkdir -p $[dirname $out] $script print-report $base_dir/stage2 > $out echo "Wrote $out" } proc osh-parser { local base_dir=_tmp/osh-parser benchmarks/osh-parser.sh stage1 ../benchmark-data/osh-parser stage2 $base_dir stage3 $base_dir } proc osh-runtime { local base_dir=_tmp/osh-runtime benchmarks/osh-runtime.sh stage1 ../benchmark-data/osh-runtime stage2 $base_dir stage3 $base_dir } # NOTE: This is just processing proc vm-baseline { local base_dir=_tmp/vm-baseline benchmarks/vm-baseline.sh stage1 ../benchmark-data/vm-baseline stage2 $base_dir stage3 $base_dir } proc ovm-build { local base_dir=_tmp/ovm-build benchmarks/ovm-build.sh stage1 ../benchmark-data/ovm-build stage2 $base_dir stage3 $base_dir } # This is one is specific to a particular machine. proc oheap { local base_dir=_tmp/oheap benchmarks/oheap.sh stage1 stage2 $base_dir stage3 $base_dir } proc all { osh-parser osh-runtime vm-baseline ovm-build oheap } # For view proc dev-index { local out=_tmp/benchmarks.html for name in [osh-parser osh-runtime vm-baseline ovm-build oheap] { echo "$name
" } > $out log "Wrote $out" } @Argv