Skip to content

Commit 4ae777a

Browse files
authored
Fix: Skip CSV header in monitor stats & Add randread tests (#167)
- Fix the resource monitor stats calculation to skip the CSV header line. - Add additional 4k and 64k randread test cases to Kokoro read suite.
1 parent bf096b4 commit 4ae777a

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

distributed-micro-benchmark/test_suites/kokoro/kokoro_read_test_cases.csv

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ read,1,1g,1m,1,20,1
1919
read,1,1g,1m,1,20,0
2020
read,48,1g,1m,1,20,1
2121
read,48,1g,1m,1,20,0
22+
randread,1,1g,4k,1,50,1
23+
randread,1,1g,4k,1,50,0
24+
randread,1,1g,4k,4,50,1
25+
randread,1,1g,4k,4,50,0
26+
randread,48,1g,4k,1,50,1
27+
randread,48,1g,4k,1,50,0
28+
randread,48,1g,4k,4,50,1
29+
randread,48,1g,4k,4,50,0
30+
randread,1,1g,64k,1,50,1
31+
randread,1,1g,64k,1,50,0
32+
randread,1,1g,64k,4,50,1
33+
randread,1,1g,64k,4,50,0
34+
randread,48,1g,64k,1,50,1
35+
randread,48,1g,64k,1,50,0
36+
randread,48,1g,64k,4,50,1
37+
randread,48,1g,64k,4,50,0
2238
randread,1,1g,1m,1,15,1
2339
randread,1,1g,1m,1,15,0
2440
randread,1,1g,1m,4,15,1

distributed-micro-benchmark/workers/monitor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
get_col_stats() {
66
local file=$1
77
local col=$2
8-
awk -F',' -v c="$col" '{sum+=$c; if($c>max) max=$c; count++} END {if(count>0) printf "%.2f %.2f\n", sum/count, max+0; else print "0 0"}' "$file"
8+
awk -F',' -v c="$col" 'NR>1 {sum+=$c; if($c>max || max=="") max=$c; count++} END {if(count>0) printf "%.2f %.2f\n", sum/count, max+0; else print "0 0"}' "$file"
99
}
1010

1111
# Aggregates monitoring data into a single line of AVG/MAX pairs for the manifest

0 commit comments

Comments
 (0)