@@ -1253,15 +1253,11 @@ def process_single_test_comparison(
12531253 if baseline_str != "" :
12541254 filters_baseline .append ("{}={}" .format (by_str_baseline , baseline_str ))
12551255 if baseline_deployment_name != "" :
1256- filters_baseline .append (
1257- "deployment_name={}" .format (baseline_deployment_name )
1258- )
1256+ filters_baseline .append ("deployment_name={}" .format (baseline_deployment_name ))
12591257 if baseline_github_org != "" :
12601258 filters_baseline .append (f"github_org={ baseline_github_org } " )
12611259 if running_platform_baseline is not None and running_platform_baseline != "" :
1262- filters_baseline .append (
1263- "running_platform={}" .format (running_platform_baseline )
1264- )
1260+ filters_baseline .append ("running_platform={}" .format (running_platform_baseline ))
12651261 filters_comparison = [
12661262 "metric={}" .format (metric_name ),
12671263 "{}={}" .format (test_filter , test_name ),
@@ -1282,10 +1278,7 @@ def process_single_test_comparison(
12821278 filters_baseline .append ("hash==" )
12831279 if "hash" not in by_str_comparison :
12841280 filters_comparison .append ("hash==" )
1285- if (
1286- running_platform_comparison is not None
1287- and running_platform_comparison != ""
1288- ):
1281+ if running_platform_comparison is not None and running_platform_comparison != "" :
12891282 filters_comparison .append (
12901283 "running_platform={}" .format (running_platform_comparison )
12911284 )
@@ -1312,36 +1305,36 @@ def process_single_test_comparison(
13121305
13131306 # Initialize result dictionary
13141307 result = {
1315- ' skip_test' : False ,
1316- ' no_datapoints_baseline' : False ,
1317- ' no_datapoints_comparison' : False ,
1318- ' no_datapoints_both' : False ,
1319- ' baseline_only' : False ,
1320- ' comparison_only' : False ,
1321- ' detected_regression' : False ,
1322- ' detected_improvement' : False ,
1323- ' unstable' : False ,
1324- ' should_add_line' : False ,
1325- ' line' : None ,
1326- ' percentage_change' : 0.0 ,
1327- ' tested_groups' : tested_groups ,
1328- ' tested_commands' : tested_commands ,
1329- ' boxplot_data' : None ,
1308+ " skip_test" : False ,
1309+ " no_datapoints_baseline" : False ,
1310+ " no_datapoints_comparison" : False ,
1311+ " no_datapoints_both" : False ,
1312+ " baseline_only" : False ,
1313+ " comparison_only" : False ,
1314+ " detected_regression" : False ,
1315+ " detected_improvement" : False ,
1316+ " unstable" : False ,
1317+ " should_add_line" : False ,
1318+ " line" : None ,
1319+ " percentage_change" : 0.0 ,
1320+ " tested_groups" : tested_groups ,
1321+ " tested_commands" : tested_commands ,
1322+ " boxplot_data" : None ,
13301323 }
13311324
13321325 if len (baseline_timeseries ) == 0 :
13331326 logging .warning (
13341327 f"No datapoints for test={ test_name } for baseline timeseries { baseline_timeseries } "
13351328 )
1336- result [' no_datapoints_baseline' ] = True
1337- result [' no_datapoints_both' ] = True
1329+ result [" no_datapoints_baseline" ] = True
1330+ result [" no_datapoints_both" ] = True
13381331
13391332 if len (comparison_timeseries ) == 0 :
13401333 logging .warning (
13411334 f"No datapoints for test={ test_name } for comparison timeseries { comparison_timeseries } "
13421335 )
1343- result [' no_datapoints_comparison' ] = True
1344- result [' no_datapoints_both' ] = True
1336+ result [" no_datapoints_comparison" ] = True
1337+ result [" no_datapoints_both" ] = True
13451338
13461339 if len (baseline_timeseries ) != 1 and multi_value_baseline is False :
13471340 if verbose :
@@ -1354,7 +1347,7 @@ def process_single_test_comparison(
13541347 logging .warning (
13551348 "\t \t Time-series: {}" .format (", " .join (baseline_timeseries ))
13561349 )
1357- result [' skip_test' ] = True
1350+ result [" skip_test" ] = True
13581351 return result
13591352
13601353 if len (comparison_timeseries ) > 1 and multi_value_comparison is False :
@@ -1364,7 +1357,7 @@ def process_single_test_comparison(
13641357 logging .warning (
13651358 "Comparison timeseries {}" .format (len (comparison_timeseries ))
13661359 )
1367- result [' skip_test' ] = True
1360+ result [" skip_test" ] = True
13681361 return result
13691362
13701363 baseline_v = "N/A"
@@ -1383,9 +1376,7 @@ def process_single_test_comparison(
13831376 note = ""
13841377 try :
13851378 for ts_name_baseline in baseline_timeseries :
1386- datapoints_inner = rts .ts ().revrange (
1387- ts_name_baseline , from_ts_ms , to_ts_ms
1388- )
1379+ datapoints_inner = rts .ts ().revrange (ts_name_baseline , from_ts_ms , to_ts_ms )
13891380 baseline_datapoints .extend (datapoints_inner )
13901381 (
13911382 baseline_pct_change ,
@@ -1440,12 +1431,12 @@ def process_single_test_comparison(
14401431 logging .warning (
14411432 f"Baseline contains datapoints but comparison not for test: { test_name } "
14421433 )
1443- result [' baseline_only' ] = True
1434+ result [" baseline_only" ] = True
14441435 if comparison_v != "N/A" and baseline_v == "N/A" :
14451436 logging .warning (
14461437 f"Comparison contains datapoints but baseline not for test: { test_name } "
14471438 )
1448- result [' comparison_only' ] = True
1439+ result [" comparison_only" ] = True
14491440 if (
14501441 baseline_v != "N/A"
14511442 and comparison_pct_change != "N/A"
@@ -1455,7 +1446,7 @@ def process_single_test_comparison(
14551446 if comparison_pct_change > 10.0 or baseline_pct_change > 10.0 :
14561447 note = "UNSTABLE (very high variance)"
14571448 unstable = True
1458- result [' unstable' ] = True
1449+ result [" unstable" ] = True
14591450
14601451 baseline_v_str = prepare_value_str (
14611452 baseline_pct_change ,
@@ -1473,23 +1464,21 @@ def process_single_test_comparison(
14731464 )
14741465
14751466 if metric_mode == "higher-better" :
1476- percentage_change = (
1477- float (comparison_v ) / float (baseline_v ) - 1
1478- ) * 100.0
1467+ percentage_change = (float (comparison_v ) / float (baseline_v ) - 1 ) * 100.0
14791468 else :
14801469 # lower-better
14811470 percentage_change = (
14821471 - (float (baseline_v ) - float (comparison_v )) / float (baseline_v )
14831472 ) * 100.0
14841473
14851474 # Collect data for box plot
1486- result [' boxplot_data' ] = (test_name , percentage_change )
1475+ result [" boxplot_data" ] = (test_name , percentage_change )
14871476 else :
14881477 logging .warn (
14891478 f"Missing data for test { test_name } . baseline_v={ baseline_v } (pct_change={ baseline_pct_change } ), comparison_v={ comparison_v } (pct_change={ comparison_pct_change } ) "
14901479 )
14911480
1492- result [' percentage_change' ] = percentage_change
1481+ result [" percentage_change" ] = percentage_change
14931482
14941483 if baseline_v != "N/A" or comparison_v != "N/A" :
14951484 detected_regression = False
@@ -1545,8 +1534,8 @@ def process_single_test_comparison(
15451534 if simplify_table is False :
15461535 note = note + " No Change"
15471536
1548- result [' detected_regression' ] = detected_regression
1549- result [' detected_improvement' ] = detected_improvement
1537+ result [" detected_regression" ] = detected_regression
1538+ result [" detected_improvement" ] = detected_improvement
15501539
15511540 line = get_line (
15521541 baseline_v_str ,
@@ -1555,12 +1544,12 @@ def process_single_test_comparison(
15551544 percentage_change ,
15561545 test_link ,
15571546 )
1558- result [' line' ] = line
1547+ result [" line" ] = line
15591548 else :
15601549 logging .warning (
15611550 "There were no datapoints both for baseline and comparison for test: {test_name}"
15621551 )
1563- result [' no_datapoints_both' ] = True
1552+ result [" no_datapoints_both" ] = True
15641553
15651554 return result
15661555
@@ -1676,49 +1665,49 @@ def process_test_wrapper(test_name):
16761665 # Second loop: Process all collected results
16771666 for test_name , result in test_results :
16781667 # Handle the results from the extracted function
1679- if result [' skip_test' ]:
1668+ if result [" skip_test" ]:
16801669 continue
16811670
1682- if result [' no_datapoints_baseline' ]:
1671+ if result [" no_datapoints_baseline" ]:
16831672 no_datapoints_baseline_list .append (test_name )
16841673 if test_name not in no_datapoints_list :
16851674 no_datapoints_list .append (test_name )
16861675
1687- if result [' no_datapoints_comparison' ]:
1676+ if result [" no_datapoints_comparison" ]:
16881677 no_datapoints_comparison_list .append (test_name )
16891678 if test_name not in no_datapoints_list :
16901679 no_datapoints_list .append (test_name )
16911680
1692- if result [' baseline_only' ]:
1681+ if result [" baseline_only" ]:
16931682 baseline_only_list .append (test_name )
16941683
1695- if result [' comparison_only' ]:
1684+ if result [" comparison_only" ]:
16961685 comparison_only_list .append (test_name )
16971686
1698- if result [' unstable' ]:
1687+ if result [" unstable" ]:
16991688 unstable_list .append ([test_name , "n/a" ])
17001689
1701- if result [' boxplot_data' ]:
1702- boxplot_data .append (result [' boxplot_data' ])
1690+ if result [" boxplot_data" ]:
1691+ boxplot_data .append (result [" boxplot_data" ])
17031692
17041693 # Handle group and command changes
1705- for test_group in result [' tested_groups' ]:
1694+ for test_group in result [" tested_groups" ]:
17061695 if test_group not in group_change :
17071696 group_change [test_group ] = []
1708- group_change [test_group ].append (result [' percentage_change' ])
1697+ group_change [test_group ].append (result [" percentage_change" ])
17091698
1710- for test_command in result [' tested_commands' ]:
1699+ for test_command in result [" tested_commands" ]:
17111700 if test_command not in command_change :
17121701 command_change [test_command ] = []
1713- command_change [test_command ].append (result [' percentage_change' ])
1702+ command_change [test_command ].append (result [" percentage_change" ])
17141703
17151704 # Handle regression/improvement detection and table updates
1716- if result [' line' ] is not None :
1717- detected_regression = result [' detected_regression' ]
1718- detected_improvement = result [' detected_improvement' ]
1719- unstable = result [' unstable' ]
1720- line = result [' line' ]
1721- percentage_change = result [' percentage_change' ]
1705+ if result [" line" ] is not None :
1706+ detected_regression = result [" detected_regression" ]
1707+ detected_improvement = result [" detected_improvement" ]
1708+ unstable = result [" unstable" ]
1709+ line = result [" line" ]
1710+ percentage_change = result [" percentage_change" ]
17221711
17231712 if detected_regression :
17241713 total_regressions = total_regressions + 1
@@ -1752,7 +1741,7 @@ def process_test_wrapper(test_name):
17521741 if should_add_line :
17531742 total_comparison_points = total_comparison_points + 1
17541743 table_full .append (line )
1755- elif result [' no_datapoints_both' ]:
1744+ elif result [" no_datapoints_both" ]:
17561745 if test_name not in no_datapoints_list :
17571746 no_datapoints_list .append (test_name )
17581747 logging .warning (
0 commit comments