summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-12-19 14:23:15 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-12-20 13:18:21 +0000
commit678695307abe339d1633f503c11ac4bedb6c1fcb (patch)
tree2b330a38885e4269f76ef0151c2d0807b7cbf1d3
parent87d95162904dfb6dbdab67226dbf7ada75ea6037 (diff)
Tests add gem_latency
-rw-r--r--tests.d/gem/gem_latency.test41
-rw-r--r--tests.d/mesa/UnrealEngine4.test3
-rw-r--r--tests.d/mesa/unigine-heaven.test3
-rw-r--r--tests.d/mesa/unigine-valley.test3
4 files changed, 44 insertions, 6 deletions
diff --git a/tests.d/gem/gem_latency.test b/tests.d/gem/gem_latency.test
new file mode 100644
index 0000000..b3ff07b
--- /dev/null
+++ b/tests.d/gem/gem_latency.test
@@ -0,0 +1,41 @@
+test_exec_time=2
+test_invert=1
+
+[ -e $IGT_BENCHMARKS/gem_latency ] || return 1
+sudo -n true || return 1
+
+__gem:latency:dispatch__() {
+ for (( c=0; c<$1; c++ )); do
+ sudo $IGT_BENCHMARKS/gem_latency -t 2 -p $2 -f 1
+ done
+}
+
+for p in 1 2 4 8 16 32 64 128; do
+ name="gem:latency:dispatch:$p"
+ test_name="$test_name $name"
+ eval "${name}_run() { __gem:latency:dispatch__ \$1 $p ; } "
+done
+
+__gem:latency:wait__() {
+ for (( c=0; c<$1; c++ )); do
+ sudo $IGT_BENCHMARKS/gem_latency -t 2 -w 2 -p $2 -f 2
+ done
+}
+
+for p in 1 2 4 8 16 32 64 128; do
+ name="gem:latency:wait:$p"
+ test_name="$test_name $name"
+ eval "${name}_run() { __gem:latency:wait__ \$1 $p ; } "
+done
+
+__gem:latency:herd__() {
+ for (( c=0; c<$1; c++ )); do
+ sudo $IGT_BENCHMARKS/gem_latency -t 2 -w 1 -c $2 -f 2
+ done
+}
+
+for p in 0 1 2 4 8 16 32 64 128; do
+ name="gem:latency:herd:$p"
+ test_name="$test_name $name"
+ eval "${name}_run() { __gem:latency:herd__ \$1 $p ; } "
+done
diff --git a/tests.d/mesa/UnrealEngine4.test b/tests.d/mesa/UnrealEngine4.test
index 03ba9f0..0a3e08e 100644
--- a/tests.d/mesa/UnrealEngine4.test
+++ b/tests.d/mesa/UnrealEngine4.test
@@ -17,8 +17,7 @@ __ue4__() {
"$benchmark" -NOSOUND -BENCHMARK $5 > /dev/null
# read back the result, skip the first frames since they are the loading frames
- cat /tmp/frametime.log | awk '{if (++n > 10) {print 1000000/$2}}' > $2#$c
- awk '{sum=sum+$1} END {print sum/NR}' $2#$c
+ awk '{if (++n > 10) {print $2}}' /tmp/frametime.log | tee $2#$c | awk '{sum=sum+$1} END {print 1000000*NR/sum}'
done
}
diff --git a/tests.d/mesa/unigine-heaven.test b/tests.d/mesa/unigine-heaven.test
index 974e31d..2b9bbdb 100644
--- a/tests.d/mesa/unigine-heaven.test
+++ b/tests.d/mesa/unigine-heaven.test
@@ -24,8 +24,7 @@ unigine:heaven_run() {
-video_fullscreen 1 >/dev/null
# read back the result, skip the first frames since they are the loading frames
- cat /tmp/frametime.log | awk '{if (++n > 100) {print 1000000/$2}}' > $2#$c
- awk '{sum=sum+$1} END {print sum/NR}' $2#$c
+ awk '{if (++n > 100) {print $2}}' /tmp/frametime.log | tee $2#$c | awk '{sum=sum+$1} END {print 1000000*NR/sum}'
done
}
diff --git a/tests.d/mesa/unigine-valley.test b/tests.d/mesa/unigine-valley.test
index 87b8f46..43a67ff 100644
--- a/tests.d/mesa/unigine-valley.test
+++ b/tests.d/mesa/unigine-valley.test
@@ -24,8 +24,7 @@ unigine:valley_run() {
-video_fullscreen 1 >/dev/null
# read back the result, skip the first frames since they are the loading frames
- cat /tmp/frametime.log | awk '{if (++n > 100) {print 1000000/$2}}' > $2#$c
- awk '{sum=sum+$1} END {print sum/NR}' $2#$c
+ awk '{if (++n > 100) {print $2}}' /tmp/frametime.log | tee $2#$c | awk '{sum=sum+$1} END {print 1000000*NR/sum}'
done
}