1# This outputs a graph of time(N), the time it takes to write 1<<N bytes in us. 2# e.g. 0 1 2 4 8 16 32 3# The last value is for 4M, convert that to MiB/s for comparison 4# 5# Ideally we want to run this per ring, 6# gem_exec_nop:rcs, gem_exec_nop:bcs, gem_exec_nop:vcs 7# though for the time being just one will suffice 8 9[ -e $IGT_BENCHMARKS/gem_prw ] || return 1 10sudo -n true || return 1 11 12for j in read write; do 13 for i in cpu gtt; do 14 test_name="$test_name gem:p$j:$i" 15 eval "gem:p$j:${i}_run() { sudo $IGT_BENCHMARKS/gem_prw -D $j -d $i -r \$1 ; }" 16 eval "gem:p$j:${i}_process() { bc -l <<< \" 4*1000000 / \${@: -1} \" ; }" 17 done 18done 19 20test_exec_time=1 21