Skip to content

Commit

Permalink
updated utility for functional testing
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
  • Loading branch information
shashank-boyapally committed Jul 10, 2024
1 parent c1f7f68 commit 24a9497
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions fmatch/test_fmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,47 @@
test_fmatch
"""

from datetime import datetime
import sys
import warnings
# pylint: disable=import-error
import pandas as pd

# pylint: disable=import-error
from matcher import Matcher

match = Matcher(index="perf_scale_ci")
res=match.get_metadata_by_uuid("b4afc724-f175-44d1-81ff-a8255fea034f",'perf_scale_ci')
warnings.filterwarnings("ignore", message="Unverified HTTPS request.*")
warnings.filterwarnings(
"ignore", category=UserWarning, message=".*Connecting to.*verify_certs=False.*"
)

match = Matcher(index="perf_scale_ci*", verify_certs=False)
res=match.get_metadata_by_uuid("b4afc724-f175-44d1-81ff-a8255fea034f",'perf_scale_ci*')

meta = {}
meta["masterNodesType"] = "m6a.xlarge"
meta["workerNodesType"] = "m6a.xlarge"
meta["platform"] = "AWS"
meta["masterNodesCount"] = 3
meta["workerNodesCount"] = 24
meta["workerNodesCount"] = 6
meta["jobStatus"] = "success"
meta["ocpVersion"] = "4.15"
meta["ocpVersion"] = "4.17"
meta["networkType"] = "OVNKubernetes"
meta["benchmark.keyword"] = "cluster-density-v2"
# meta['encrypted'] = "true"
# meta['ipsec'] = "false"
# meta['fips'] = "false"

uuids = match.get_uuid_by_metadata(meta)
print("All uuids",len(uuids))
date= datetime.strptime("2024-07-01T13:46:24Z","%Y-%m-%dT%H:%M:%SZ")
uuids2= match.get_uuid_by_metadata(meta,lookback_date=date)
print("lookback uuids",len(uuids2))
uuids2 = match.get_uuid_by_metadata(meta)
if len(uuids) == 0:
print("No UUID present for given metadata")
sys.exit()
runs = match.match_kube_burner(uuids)
runs = match.match_kube_burner(uuids,"ripsaw-kube-burner*")

ids = match.filter_runs(runs, runs)
podl_metrics = {
Expand Down

0 comments on commit 24a9497

Please sign in to comment.