diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-08-26 11:58:13 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-08-26 11:58:13 +0300 |
commit | cd9270faa7af6773637d9159b995c37bd87ef4e6 (patch) | |
tree | 33d086ee25fdb9e42347df68373775fddfc6c9ef | |
download | benchmarker-cd9270faa7af6773637d9159b995c37bd87ef4e6.tar.gz |
first commit
-rw-r--r-- | README.md | 16 | ||||
-rwxr-xr-x | benchmarker | 39 |
2 files changed, 55 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad7c855 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +benchmarker - compare speeds of aspects of Linux systems +============================================================================= + +Wrote this for Debian. + +Install tools from packages: + +```sh +apt install handbrake-cli +``` + +Run: + +```sh +./benchmarker +``` 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" |