From daeadb177a32b0439f62eac98cb5d2ffd6458abb Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Fri, 23 Sep 2022 11:35:52 +0200 Subject: [PATCH] perf/pm: Add number of all readings to the all_* log Signed-off-by: Michal Berger Change-Id: Id9f249926cf8a1ba3648e7a732b2a368dfb3d9e8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14655 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Jim Harris --- scripts/perf/pm/collect-bmc-pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/perf/pm/collect-bmc-pm b/scripts/perf/pm/collect-bmc-pm index 209a93ae3..0f9b1c213 100755 --- a/scripts/perf/pm/collect-bmc-pm +++ b/scripts/perf/pm/collect-bmc-pm @@ -329,8 +329,10 @@ dump_readings() { ((total += ${reading%.*})) done avg=$((total / ${#readings[@]})) + + readings+=("Total: ${#readings[@]}") printf '%u\n' "$avg" > "$output_dir/${prefix:+${prefix}_}avg_${sensor}.bmc.pm.txt" - printf '%u\n' "${readings[@]}" > "$output_dir/${prefix:+${prefix}_}all_${sensor}.bmc.pm.txt" + printf '%s\n' "${readings[@]}" > "$output_dir/${prefix:+${prefix}_}all_${sensor}.bmc.pm.txt" printf 'Dumped avg to %s\n' "$output_dir/${prefix:+${prefix}_}avg_${sensor}.bmc.pm.txt" >&2 printf 'Dumped all to %s\n' "$output_dir/${prefix:+${prefix}_}all_${sensor}.bmc.pm.txt" >&2 done