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