X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=csit.infra.dash%2Fapp%2Fcdash%2Ftrending%2Fgraphs.py;h=b6581e67f4008e923a7e2309d9dc00df26c89205;hb=a214378b5d0589fcbd9a9cc8c9b25bce8a862cec;hp=79e2697f54fde36c6ae6b1976b422b061a287945;hpb=a68514255a58ae6c982e40c47247abf64e58f3f4;p=csit.git diff --git a/csit.infra.dash/app/cdash/trending/graphs.py b/csit.infra.dash/app/cdash/trending/graphs.py index 79e2697f54..b6581e67f4 100644 --- a/csit.infra.dash/app/cdash/trending/graphs.py +++ b/csit.infra.dash/app/cdash/trending/graphs.py @@ -11,7 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -""" +"""Implementation of graphs for trending data. """ import plotly.graph_objects as go @@ -68,14 +68,19 @@ def select_trending_data(data: pd.DataFrame, itm: dict) -> pd.DataFrame: else: return None - core = str() if itm["dut"] == "trex" else f"{itm['core']}" - ttype = "ndrpdr" if itm["testtype"] in ("ndr", "pdr") else itm["testtype"] - + if itm["testtype"] in ("ndr", "pdr"): + test_type = "ndrpdr" + elif itm["testtype"] == "mrr": + test_type = "mrr" + elif itm["area"] == "hoststack": + test_type = "hoststack" df = data.loc[( - (data["test_type"] == ttype) & + (data["test_type"] == test_type) & (data["passed"] == True) )] df = df[df.job.str.endswith(f"{topo}-{arch}")] + core = str() if itm["dut"] == "trex" else f"{itm['core']}" + ttype = "ndrpdr" if itm["testtype"] in ("ndr", "pdr") else itm["testtype"] df = df[df.test_id.str.contains( f"^.*[.|-]{nic}.*{itm['framesize']}-{core}-{drv}{itm['test']}-{ttype}$", regex=True