plugin: local
name: benchmarks/disk/hdparm-read
requires: device.category == 'DISK'
description: Benchmark for each disk
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
 plugin: shell
 name: benchmarks/disk/hdparm-read_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: hdparm -t /dev/`ls /sys$path/block | sed 's|!|/|'` | sed -e :a -e '$!N;s/\n/ /;ta' | sed 's/.*= *//'
 description: This test runs hdparm timing of device reads as a benchmark for $path
 EOF

plugin: local
name: benchmarks/disk/hdparm-cache-read
requires: device.category == 'DISK'
description: Benchmark for each disk
command:
 cat <<'EOF' | run_templates -t -s 'udev_resource | filter_templates -w "category=DISK"'
 plugin: shell
 name: benchmarks/disk/hdparm-cache-read_`ls /sys$path/block`
 requires: device.path == "$path"
 user: root
 command: hdparm -T /dev/`ls /sys$path/block | sed 's|!|/|'` | sed -e :a -e '$!N;s/\n/ /;ta' | sed 's/.*= *//'
 description: This test runs hdparm timing of cache reads as a benchmark for $path
 EOF

plugin: shell
name: benchmarks/graphics/gtkperf
depends: graphics/xorg-version
requires: package.name == 'gtkperf'
command: python3 -c 'import re,sys,subprocess; (s, o) = subprocess.getstatusoutput("gtkperf -a"); [sys.exit(1) for i in [s] if s]; m = re.search("Total time:\s+(.*)\n", o); [print(i.group(1)+" Seconds") for i in [m] if m]'
estimated_duration: 30.000
description:
 Run gtkperf to make sure that GTK based test cases work

plugin: shell
name: benchmarks/graphics/render-bench
requires: package.name == 'render-bench'
command: /usr/bin/time -f "%e Seconds" render_bench 2>&1 >/dev/null
estimated_duration: 52.000
description: Run Render-Bench XRender/Imlib2 benchmark

plugin: shell
name: benchmarks/graphics/qgears2-Xrender-gearsfancy
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="qgears2.render-backend=1; qgears2.test-mode=0" pts_run qgears2
estimated_duration: 180.000
description: Run Qgears2 XRender Extension gearsfancy benchmark

plugin: shell
name: benchmarks/graphics/qgears2-Xrender-compo
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="qgears2.render-backend=1; qgears2.test-mode=2" pts_run qgears2
estimated_duration: 31.500
description: Run Qgears2 XRender Extension image scaling benchmark

plugin: shell
name: benchmarks/graphics/qgears2-gl-gearsfancy
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="qgears2.render-backend=2; qgears2.test-mode=0" pts_run qgears2
estimated_duration: 52.000
description: Run Qgears2 OpenGL gearsfancy benchmark

plugin: shell
name: benchmarks/graphics/qgears2-gl-compo
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="qgears2.render-backend=2; qgears2.test-mode=2" pts_run qgears2
estimated_duration: 23.000
description: Run Qgears2 OpenGL image scaling benchmark

plugin: shell
name: benchmarks/graphics/glmark2-es2
requires:
 package.name == 'glmark2-es2'
 'arm' in cpuinfo.type
command:
 glmark2-es2 2>&1 | sed -e :a -e '$!N;s/\n/ /;ta' | sed -E 's/.*(Score:\s+[0-9]+).*/\1/'
description: Run GLmark2-ES2 benchmark

plugin: shell
name: benchmarks/graphics/glmark2
requires:
 package.name == 'glmark2'
 cpuinfo.platform in ("i386", "x86_64")
command:
 glmark2 2>&1 | sed -e :a -e '$!N;s/\n/ /;ta' | sed -E 's/.*(Score:\s+[0-9]+).*/\1/'
estimated_duration: 306.000
description: Run GLmark2 benchmark

plugin: shell
name: benchmarks/graphics/globs
requires:
 package.name == 'globs'
 cpuinfo.platform in ("i386", "x86_64")
command: glob_test --min-fps=26 --ignore-problems
estimated_duration: 53.500
description: Run globs benchmark

plugin: shell
name: benchmarks/graphics/unigine-sanctuary
requires: package.name == 'phoronix-test-suite'
command: pts_run unigine-sanctuary
description: Run Unigine Santuary benchmark

plugin: shell
name: benchmarks/graphics/unigine-tropics
requires: package.name == 'phoronix-test-suite'
command: pts_run unigine-tropics
description: Run Unigine Tropics benchmark

plugin: shell
name: benchmarks/graphics/unigine-heaven
requires: package.name == 'phoronix-test-suite'
command: pts_run unigine-heaven
description: Run Unigine Heaven benchmark

plugin: shell
name: benchmarks/graphics/lightsmark
requires: package.name == 'phoronix-test-suite'
command: pts_run lightsmark
description: Run Lightsmark benchmark

plugin: shell
name: benchmarks/memory/cachebench-read
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="cachebench.test=0" pts_run cachebench
description: Run Cachebench Read benchmark

plugin: shell
name: benchmarks/memory/cachebench-write
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="cachebench.test=1" pts_run cachebench
description: Run Cachebench Write benchmark

plugin: shell
name: benchmarks/memory/cachebench-read-modify-write
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="cachebench.test=2" pts_run cachebench
description: Run Cachebench Read / Modify / Write benchmark

plugin: shell
name: benchmarks/memory/stream-copy
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="stream.run-type=0" pts_run stream
description: Run Stream Copy benchmark

plugin: shell
name: benchmarks/memory/stream-scale
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="stream.run-type=1" pts_run stream
description: Run Stream Scale benchmark

plugin: shell
name: benchmarks/memory/stream-add
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="stream.run-type=2" pts_run stream
description: Run Stream Add benchmark

plugin: shell
name: benchmarks/memory/stream-triad
requires: package.name == 'phoronix-test-suite'
command: PRESET_OPTIONS="stream.run-type=3" pts_run stream
description: Run Stream Triad benchmark

plugin: shell
name: benchmarks/network/network-loopback
requires: package.name == 'phoronix-test-suite'
command: pts_run network-loopback
estimated_duration: 85.0
description: Run Network Loopback benchmark

plugin: shell
name: benchmarks/network/wifi_time_to_reconnect
requires: device.category == 'WIRELESS'
command: wifi_time2reconnect
description: Check the time needed to reconnect to a WIFI access point

plugin: shell
name: benchmarks/processor/encode-mp3
requires: package.name == 'phoronix-test-suite'
command: pts_run encode-mp3
description: Run Encode MP3 benchmark

plugin: shell
name: benchmarks/processor/x264
requires: package.name == 'phoronix-test-suite'
command: pts_run x264
description: Run x264 H.264/AVC encoder benchmark

plugin: shell
name: benchmarks/processor/gnupg
requires: package.name == 'phoronix-test-suite'
command: pts_run gnupg
description: Run GnuPG benchmark

plugin: shell
name: benchmarks/processor/compress-pbzip2
requires: package.name == 'phoronix-test-suite'
command: pts_run compress-pbzip2
description: Run Compress PBZIP2 benchmark

plugin: shell
name: benchmarks/processor/compress-7zip
requires: package.name == 'phoronix-test-suite'
command: pts_run compress-7zip
description: Run Compress 7ZIP benchmark

plugin: shell
name: benchmarks/processor/n-queens
requires: package.name == 'phoronix-test-suite'
command: pts_run n-queens
description: Run N-Queens benchmark

plugin: shell
name: benchmarks/processor/himeno
requires: package.name == 'phoronix-test-suite'
command: pts_run himeno
description: Run Himeno benchmark

plugin: shell
name: benchmarks/system/cpu_on_idle
requires: package.name == 'sysstat'
command: iostat -x -m 1 10 | python3 -c 'import sys, re; lines="".join(sys.stdin.readlines()); l=[float(n) for n in (re.findall("idle\n.*?(\S+)\n", lines))]; print(sum(l)/len(l),"%")'
description: CPU utilization on an idle system.

plugin: shell
name: benchmarks/system/disk_on_idle
requires: package.name == 'sysstat'
command: iostat -x -m 1 10 | python3 -c 'import sys, re; lines="".join(sys.stdin.readlines()); l=[float(n) for n in (re.findall("util\n.*?(\S+)\n", lines))]; print(sum(l)/len(l),"%")'
description: Disk utilization on an idle system.

plugin: shell
name: benchmarks/graphics/gputest_furmark_fullscreen_1920x1080
requires:
 package.name == 'gputest'
 cpuinfo.platform == 'x86_64'
command: gputest_benchmark fur --width 1920 --height 1080 -f
estimated_duration: 75.000
description:
 Run a stress test based on FurMark (OpenGL 2.1 or 3.2)
 Fullscreen 1920x1080 no antialiasing

plugin: shell
name: benchmarks/graphics/gputest_furmark_windowed_1024x640
requires:
 package.name == 'gputest'
 cpuinfo.platform == 'x86_64'
command: gputest_benchmark fur
estimated_duration: 75.000
description:
 Run a stress test based on FurMark (OpenGL 2.1 or 3.2)
 Windowed 1024x640 no antialiasing

plugin: shell
name: benchmarks/graphics/gputest_gimark_fullscreen_1920x1080
requires:
 package.name == 'gputest'
 cpuinfo.platform == 'x86_64'
command: gputest_benchmark gi --width 1920 --height 1080 -f
estimated_duration: 75.00
description:
 Run GiMark, a geometry instancing test (OpenGL 3.3)
 Fullscreen 1920x1080 no antialiasing

plugin: shell
name: benchmarks/graphics/gputest_gimark_windowed_1024x640
requires:
 package.name == 'gputest'
 cpuinfo.platform == 'x86_64'
command: gputest_benchmark gi
estimated_duration: 75.500
description:
 Run GiMark, a geometry instancing test (OpenGL 3.3)
 Windowed 1024x640 no antialiasing

plugin: shell
name: benchmarks/graphics/gputest_tessmark_fullscreen_1920x1080
requires:
 package.name == 'gputest'
 cpuinfo.platform == 'x86_64'
command: gputest_benchmark tess --width 1920 --height 1080 -f
estimated_duration: 75.000
description:
 Run a tessellation test based on TessMark (OpenGL 4.0)
 Fullscreen 1920x1080 no antialiasing

plugin: shell
name: benchmarks/graphics/gputest_tessmark_windowed_1024x640
requires:
 package.name == 'gputest'
 cpuinfo.platform == 'x86_64'
command: gputest_benchmark tess
description:
 Run a tessellation test based on TessMark (OpenGL 4.0)
 Windowed 1024x640 no antialiasing
