2222from tqdm import tqdm
2323
2424from redisbench_admin .utils .local import check_dataset_local_requirements
25+ from redisbench_admin .utils .utils import get_ts_metric_name
2526
2627
2728def get_git_root (path ):
@@ -498,19 +499,15 @@ def extract_perversion_timeseries_from_results(
498499 version_tags ["version" ] = project_version
499500 version_tags ["test_name" ] = str (test_name )
500501 version_tags ["metric" ] = str (metric_name )
501-
502- ts_name = (
503- "ci.benchmarks.redislabs/by.version/"
504- "{triggering_env}/{github_org}/{github_repo}/"
505- "{test_name}/{deployment_type}/{version}/{metric}" .format (
506- version = project_version ,
507- github_org = tf_github_org ,
508- github_repo = tf_github_repo ,
509- deployment_type = deployment_type ,
510- test_name = test_name ,
511- triggering_env = tf_triggering_env ,
512- metric = metric_name ,
513- )
502+ ts_name = get_ts_metric_name (
503+ "by.version" ,
504+ project_version ,
505+ tf_github_org ,
506+ tf_github_repo ,
507+ deployment_type ,
508+ test_name ,
509+ tf_triggering_env ,
510+ metric_name ,
514511 )
515512
516513 branch_time_series_dict [ts_name ] = {
@@ -559,6 +556,16 @@ def extract_perbranch_timeseries_from_results(
559556 pass
560557 finally :
561558 metric_name = jsonpath [2 :]
559+ ts_name = get_ts_metric_name (
560+ "by.branch" ,
561+ tf_github_branch ,
562+ tf_github_org ,
563+ tf_github_repo ,
564+ deployment_type ,
565+ test_name ,
566+ tf_triggering_env ,
567+ metric_name ,
568+ )
562569 find_res = jsonpath_expr .find (results_dict )
563570 if find_res is not None and len (find_res ) > 0 :
564571 metric_value = float (find_res [0 ].value )
@@ -569,19 +576,6 @@ def extract_perbranch_timeseries_from_results(
569576 branch_tags ["branch" ] = str (tf_github_branch )
570577 branch_tags ["test_name" ] = str (test_name )
571578 branch_tags ["metric" ] = str (metric_name )
572- ts_name = (
573- "ci.benchmarks.redislabs/by.branch/"
574- "{triggering_env}/{github_org}/{github_repo}/"
575- "{test_name}/{deployment_type}/{branch}/{metric}" .format (
576- branch = str (tf_github_branch ),
577- github_org = tf_github_org ,
578- github_repo = tf_github_repo ,
579- deployment_type = deployment_type ,
580- test_name = test_name ,
581- triggering_env = tf_triggering_env ,
582- metric = metric_name ,
583- )
584- )
585579
586580 branch_time_series_dict [ts_name ] = {
587581 "labels" : branch_tags .copy (),
@@ -595,31 +589,23 @@ def extract_perbranch_timeseries_from_results(
595589
596590
597591def get_overall_dashboard_keynames (tf_github_org , tf_github_repo , tf_triggering_env ):
598- testcases_setname = (
592+ prefix = (
599593 "ci.benchmarks.redislabs/"
600- "{triggering_env}/{github_org}/{github_repo}:testcases " .format (
594+ + "{triggering_env}/{github_org}/{github_repo}" .format (
601595 triggering_env = tf_triggering_env ,
602596 github_org = tf_github_org ,
603597 github_repo = tf_github_repo ,
604598 )
605599 )
606- tsname_project_total_success = (
607- "ci.benchmarks.redislabs/"
608- "{triggering_env}/{github_org}/{github_repo}:total_success" .format (
609- triggering_env = tf_triggering_env ,
610- github_org = tf_github_org ,
611- github_repo = tf_github_repo ,
612- )
600+ testcases_setname = "{}:testcases" .format (prefix )
601+ tsname_project_total_success = "{}:total_success" .format (
602+ prefix ,
613603 )
614- tsname_project_total_failures = (
615- "ci.benchmarks.redislabs/"
616- "{triggering_env}/{github_org}/{github_repo}:total_failures" .format (
617- triggering_env = tf_triggering_env ,
618- github_org = tf_github_org ,
619- github_repo = tf_github_repo ,
620- )
604+ tsname_project_total_failures = "{}:total_failures" .format (
605+ prefix ,
621606 )
622607 return (
608+ prefix ,
623609 testcases_setname ,
624610 tsname_project_total_failures ,
625611 tsname_project_total_success ,
0 commit comments