scripts: factor out benchmarks and run further with ./eeval and common_bench_cmd

This commit is contained in:
Ciro Santilli
2018-04-18 12:26:41 +01:00
parent 96090a4c24
commit f4eed4163b
7 changed files with 52 additions and 20 deletions

17
common
View File

@@ -1,4 +1,21 @@
#!/usr/bin/env bash
common_bench_cmd() (
# Benchmark a command.
#
# $1: command to benchmark
# $2: where to write results to
#
# Result format:
#
# cmd <command run>
# time <time in seconds to finish>
# status <exit status>
cmd="$1"
results_file="$2"
printf 'cmd ' >> "$results_file"
env time --append -f 'time %e' --output="$results_file" ./eeval -a "$cmd" "$results_file"
printf "status $?\n" >> "$results_file"
)
set_common_vars() {
arch="$1"
gem5="${2:-false}"