summaryrefslogtreecommitdiff
path: root/benchmarker
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarker')
-rwxr-xr-xbenchmarker39
1 files changed, 39 insertions, 0 deletions
diff --git a/benchmarker b/benchmarker
new file mode 100755
index 0000000..25a9997
--- /dev/null
+++ b/benchmarker
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -eu
+
+die()
+{
+ echo "$@" 1>&2
+ exit 1
+}
+
+gotcmd()
+{
+ command -v "$1" > /dev/null || die "Need command $1"
+}
+
+gotfile()
+{
+ test -e "$1" || die "Need file $1"
+}
+
+
+cpubench()
+{
+ gotfile "$1"
+ gotcmd HandBrakeCLI
+ time HandBrakeCLI --main-feature \
+ -Z "H.265 MKV 720p30" \
+ --all-audio \
+ --subtitle-lang-list fin \
+ --first-subtitle \
+ -i "$1" \
+ -o /dev/null
+
+}
+
+
+skyfall="$1"
+
+cpubench "$skyfall"