From 02d7812f461cf0481ae63faecbab2e62169e8abe Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Tue, 26 Mar 2019 09:25:40 +0100 Subject: [PATCH] scripts/perf: Update results parsing in nvmf benchmark scripts Wrong indent level caused results to be duplicated in final output file if configuration file was used to run more than one workload combination. Change-Id: I0fadc10eba38898df648ec2da5fbd0440a3b9693 Signed-off-by: Karol Latecki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449150 Tested-by: SPDK CI Jenkins Reviewed-by: Pawel Kaminski Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto --- scripts/perf/nvmf/run_nvmf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/perf/nvmf/run_nvmf.py b/scripts/perf/nvmf/run_nvmf.py index a992ea0a1..110181813 100755 --- a/scripts/perf/nvmf/run_nvmf.py +++ b/scripts/perf/nvmf/run_nvmf.py @@ -154,10 +154,10 @@ class Target(Server): total = ["{0:.3f}".format(sum(c)) for c in zip(*inits_avg_results)] rows.add(",".join([job_name, *total])) - # Save results to file - for row in rows: - with open(os.path.join(results_dir, csv_file), "a") as fh: - fh.write(row + "\n") + # Save results to file + for row in rows: + with open(os.path.join(results_dir, csv_file), "a") as fh: + fh.write(row + "\n") def measure_sar(self, results_dir, sar_file_name): self.log_print("Waiting %d delay before measuring SAR stats" % self.sar_delay)