#!/bin/bash # # Common functions for benchmarks. # # What binary the benchmarks will run. readonly OSH_OVM=$(OSH_OVM:-$PWD/_bin/osh) # NOTE: This is in {build,test}/common.sh too. proc die { echo "FATAL: $ifsjoin(ARGV)" 1>&2 exit 1 } proc log { echo @ARGV 1>&2 } proc csv-concat { tools/csv_concat.py @ARGV; } # TSV and CSV concatenation are actually the same. Just use the same script. proc tsv-concat { tools/csv_concat.py @ARGV; } # For compatibility, if cell starts with 'osh', apply the 'special' CSS class. proc csv2html { web/table/csv2html.py --css-class-pattern 'special ^osh' @ARGV; } proc tsv2html { web/table/csv2html.py --tsv @ARGV; } # Need an absolute path here. readonly _time_tool=$PWD/benchmarks/time.py proc time-tsv { $_time_tool --tsv @ARGV; }