scripts/perf: replace spaces for BMC's sensor names

Replace spaces with undescores for each sensor name
to avoid dealing with filenames with spaces later.

Change-Id: I2115cc14a15a53a7d92a7dae5cb6d1bfa7fb4402
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Karol Latecki 2022-11-09 10:35:05 +01:00 committed by Tomasz Zawadzki
parent 533039a235
commit a86fa6d1a4

View File

@ -386,6 +386,7 @@ dump_readings() {
avg=$((total / ${#readings[@]})) avg=$((total / ${#readings[@]}))
readings+=("Total: ${#readings[@]}") readings+=("Total: ${#readings[@]}")
sensor="${sensor//[[:space:]]/_}"
printf '%u\n' "$avg" > "$output_dir/${prefix:+${prefix}_}avg_${sensor}.bmc.pm.txt" printf '%u\n' "$avg" > "$output_dir/${prefix:+${prefix}_}avg_${sensor}.bmc.pm.txt"
printf '%s\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 avg to %s\n' "$output_dir/${prefix:+${prefix}_}avg_${sensor}.bmc.pm.txt" >&2