summaryrefslogtreecommitdiff
path: root/benchmarks/ezbench.d/gem_prw.test
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/ezbench.d/gem_prw.test')
-rw-r--r--benchmarks/ezbench.d/gem_prw.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/benchmarks/ezbench.d/gem_prw.test b/benchmarks/ezbench.d/gem_prw.test
new file mode 100644
index 00000000..a2f49398
--- /dev/null
+++ b/benchmarks/ezbench.d/gem_prw.test
@@ -0,0 +1,20 @@
+# This outputs a graph of time(N), the time it takes to write 1<<N bytes in us.
+# e.g. 0 1 2 4 8 16 32
+# The last value is for 4M, convert that to MiB/s for comparison
+#
+# Ideally we want to run this per ring,
+# gem_exec_nop:rcs, gem_exec_nop:bcs, gem_exec_nop:vcs
+# though for the time being just one will suffice
+
+[ -e $IGT_BENCHMARKS/gem_prw ] || return 1
+sudo -n true || return 1
+
+for j in read write; do
+ for i in cpu gtt; do
+ test_name="$test_name gem:p$j:$i"
+ eval "gem:p$j:${i}_run() { sudo $IGT_BENCHMARKS/gem_prw -D $j -d $i -r \$1 ; }"
+ eval "gem:p$j:${i}_process() { bc -l <<< \" 4*1000000 / \${@: -1} \" ; }"
+ done
+done
+
+test_exec_time=1