mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
bench-all: add build benchmarks and make all benchmarks options
run: fix ./run -gu broken behaviour. Document ./tmu window switch failure. readme: move travis failed attempt to readme.
This commit is contained in:
10
common
10
common
@@ -6,7 +6,7 @@ common_bench_cmd() (
|
||||
# Benchmark a command.
|
||||
#
|
||||
# $1: command to benchmark
|
||||
# $2: where to write results to
|
||||
# $2: where to append write results to. Default: /dev/null.
|
||||
#
|
||||
# Result format:
|
||||
#
|
||||
@@ -14,16 +14,20 @@ common_bench_cmd() (
|
||||
# time <time in seconds to finish>
|
||||
# exit_status <exit status>
|
||||
cmd="$1"
|
||||
results_file="$2"
|
||||
results_file="${2:-/dev/null}"
|
||||
printf 'cmd ' >> "$results_file"
|
||||
env time --append -f 'time %e' --output="$results_file" ./eeval -a "$cmd" "$results_file"
|
||||
env time --append -f 'time %e' --output="$results_file" "${root_dir}/eeval" -a "$cmd" "$results_file"
|
||||
printf "exit_status $?\n" >> "$results_file"
|
||||
)
|
||||
set_common_vars() {
|
||||
arch="$1"
|
||||
gem5="${2:-false}"
|
||||
common_suffix="${3:-}"
|
||||
buildroot_dir="${root_dir}/buildroot"
|
||||
arch_dir="$arch"
|
||||
if [ -n "$common_suffix" ]; then
|
||||
arch_dir="${arch_dir}-${common_suffix}"
|
||||
fi
|
||||
out_arch_dir="${out_dir}/${arch_dir}"
|
||||
buildroot_out_dir="${out_arch_dir}/buildroot"
|
||||
build_dir="${buildroot_out_dir}/build"
|
||||
|
||||
Reference in New Issue
Block a user