Commit cd2cd093 authored by Kirill Smelkov's avatar Kirill Smelkov

X bench_disk: Add std bench format

parent 98c8aaac
...@@ -744,8 +744,19 @@ bench_cpu() { ...@@ -744,8 +744,19 @@ bench_cpu() {
# bench_disk - benchmark direct (uncached) and cached random reads # bench_disk - benchmark direct (uncached) and cached random reads
bench_disk() { bench_disk() {
# ioping2bench <topic> - converts timings from ioping to std benchmark
ioping2bench() {
# XXX normalize all units to µs (benchstat treats time and µs as different - XXX better improve benchstat)
sed -u -e \
"s|^min/avg/max/mdev = \([0-9.]\+\) \([^ ]\+\) / \([0-9.]\+\) \([^ ]\+\) / \([0-9.]\+\)\+ \([^ ]\+\) / \([0-9.]\+\) \([^ ]\+\)\$|&\n\
Benchmark$1-min 1 \\1 \\2/op\n\
Benchmark$1-avg 1 \\3 \\4/op\
|"
}
echo -e "\n*** disk: random direct (no kernel cache) 4K-read latency" echo -e "\n*** disk: random direct (no kernel cache) 4K-read latency"
nrun ioping -D -i 0ms -s 4k -S 1024M -w 3s -q -k . nrun ioping -D -i 0ms -s 4k -S 1024M -w 3s -q -k . |\
ioping2bench "`hostname`/disk/randread/direct/4K"
echo -e "\n*** disk: random cached 4K-read latency" echo -e "\n*** disk: random cached 4K-read latency"
# warmup so kernel puts the file into pagecache # warmup so kernel puts the file into pagecache
...@@ -753,7 +764,8 @@ bench_disk() { ...@@ -753,7 +764,8 @@ bench_disk() {
cat ioping.tmp >/dev/null cat ioping.tmp >/dev/null
done done
nrun ioping -C -i 0ms -s 4k -S 1024M -w 3s -q -k . nrun ioping -C -i 0ms -s 4k -S 1024M -w 3s -q -k . |\
ioping2bench "`hostname`/disk/randread/pagecache/4K"
} }
#hashfunc=sha1 #hashfunc=sha1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment