Ceph benchmark report polishing and hotfixes
- Ordered taskfile report
- Skipping of already performed tasks
- Visual aids on viewing details and column sizes
- Column desctiptions and notes
Fixes:
- Fixed option overwriting in taskfile mode
- Updated retry operation logging and timing
Related-PROD: PROD-36669
Change-Id: I92c049f0043e45bf032ca15e4fa3260355ee0eed
diff --git a/cfg_checker/modules/ceph/bench.py b/cfg_checker/modules/ceph/bench.py
index 0780596..c0877db 100644
--- a/cfg_checker/modules/ceph/bench.py
+++ b/cfg_checker/modules/ceph/bench.py
@@ -2,6 +2,7 @@
import os
import json
+from copy import deepcopy
from datetime import datetime, timedelta, timezone
from cfg_checker.common import logger_cli
@@ -448,6 +449,7 @@
for idx in range(_total_tasks):
# init time to schedule
_task = self.tasks[idx]
+ _r = self.results
logger_cli.info(
"-> Starting next task ({}/{})".format(idx+1, _total_tasks)
)
@@ -459,11 +461,40 @@
)
# update options
options.update(_task)
+ # Check if such result already exists
+ o = "input_options"
+ _existing = filter(
+ lambda t:
+ _r[t]["id"] == idx and
+ _r[t]["mode"] == "tasks" and
+ _r[t][o]["readwrite"] == options["readwrite"] and
+ _r[t][o]["rwmixread"] == options["rwmixread"] and
+ _r[t][o]["bs"] == options["bs"] and
+ _r[t][o]["iodepth"] == options["iodepth"] and
+ _r[t][o]["size"] == options["size"],
+ _r
+ )
+ if len(list(_existing)) > 0:
+ logger_cli.info(
+ "-> Skipped already performed task from {}: "
+ "line {}, {}({}), {}, {}, {}".format(
+ self.taskfile,
+ idx,
+ options["readwrite"],
+ options["rwmixread"],
+ options["bs"],
+ options["iodepth"],
+ options["size"]
+ )
+ )
+ continue
_sch_time = self._get_next_scheduled_time()
options["scheduled_to"] = _sch_time
# init results table
- self.results[_sch_time] = {
- "input_options": options,
+ _r[_sch_time] = {
+ "id": idx,
+ "mode": self.mode,
+ "input_options": deepcopy(options),
"agents": {},
"ceph": {}
}
@@ -479,6 +510,7 @@
options["scheduled_to"] = _sch_time
# init results table
self.results[_sch_time] = {
+ "id": "{:2}".format(0),
"input_options": options,
"agents": {},
"ceph": {}