mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
scripts: factor out benchmarks and run further with ./eeval and common_bench_cmd
This commit is contained in:
17
common
17
common
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user