cfg-checker ceph bench module alpha version
- Ceph benchmark report (beta)
- Updated result time choosing. Now results reported based on start time
- New methods for listing
- Cleanup-only mode
- Unified results processing
- Additional ceph info gather
- Experimental barchart graph example
Fixes:
- Kube API client recreated each time for stability (HTTP/WebSocket specifics)
- args naming fixes
-
Change-Id: Id541f789a00ab4ee827603c5b6f7f07899aaa7c5
diff --git a/cfg_checker/reports/reporter.py b/cfg_checker/reports/reporter.py
index dc9a2cf..150ce65 100644
--- a/cfg_checker/reports/reporter.py
+++ b/cfg_checker/reports/reporter.py
@@ -6,6 +6,7 @@
from cfg_checker.common import const
from cfg_checker.common import logger_cli
from cfg_checker.common.file_utils import read_file_as_lines
+from cfg_checker.modules.ceph.bench import _reformat_timestr
import jinja2
@@ -164,6 +165,10 @@
return _steps
+def time_strip(timestring):
+ return _reformat_timestr(timestring, _tchar="")
+
+
def get_osdmap(cs):
_osdmap = cs
while True:
@@ -185,7 +190,7 @@
}
-def get_pool_stats(id, pgdump):
+def get_pool_stats_by_id(id, pgdump):
_stats = {}
for pool in pgdump["pg_map"]["pool_stats"]:
if id == pool["poolid"]:
@@ -248,8 +253,9 @@
self.jinja2_env.filters['to_mb'] = to_mb
self.jinja2_env.filters['get_bucket_item_name'] = get_bucket_item_name
self.jinja2_env.filters['get_rule_steps'] = get_rule_steps
- self.jinja2_env.filters['get_pool_stats'] = get_pool_stats
+ self.jinja2_env.filters['get_pool_stats'] = get_pool_stats_by_id
self.jinja2_env.filters['get_osdmap'] = get_osdmap
+ self.jinja2_env.filters['tstrip'] = time_strip
# render!
logger_cli.info("-> Using template: {}".format(self.tmpl))
@@ -283,6 +289,10 @@
tmpl = "ceph_info_html.j2"
+class HTMLCephBench(_TMPLBase):
+ tmpl = "ceph_bench_html.j2"
+
+
# Package versions report
class HTMLModelCompare(_TMPLBase):
tmpl = "model_tree_cmp_tmpl.j2"