scripts/nvmf: fixed type error in sar measurements

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibcc7a77d1ebcc013b5050564fcc31b23b1202912
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9840
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This commit is contained in:
Maciej Wawryk 2021-10-12 15:25:59 +02:00 committed by Jim Harris
parent a72f77e9b1
commit 328a75c0cb

View File

@ -585,11 +585,11 @@ class Target(Server):
elif "all" in line:
self.log_print(line)
else:
sar_idle_sum += line.split()[7]
sar_idle_sum += float(line.split()[7])
fh.write(out)
sar_cpu_usage = cpu_number * 100 - sar_idle_sum
with open(os.path.join(results_dir, sar_file_name), "a") as f:
f.write("Total CPU used: ".join(sar_cpu_usage))
f.write("Total CPU used: " + str(sar_cpu_usage))
def measure_pcm_memory(self, results_dir, pcm_file_name):
time.sleep(self.pcm_delay)