@@ -1023,7 +1023,20 @@ def _finalize_bw_peak_checks(self, test_case_name: str) -> None:
10231023 peak = state ["peak_value" ]
10241024 sku_bw = state ["sku_bw" ]
10251025 required = sku_bw * 0.9
1026- if peak < required :
1026+ last_msg = state ["last_msg" ]
1027+ criteria_met = peak >= required
1028+ if criteria_met :
1029+ eval_msg = (
1030+ f"\u2713 { base_metric } : peak { peak :.3f} Gbps reached "
1031+ f"{ (peak / sku_bw * 100 ):.1f} % of SKU max "
1032+ f"{ sku_bw :.3f} Gbps "
1033+ f"(required >= { required :.3f} Gbps)"
1034+ )
1035+ self ._log .info (
1036+ f"[BwPeak] SKU 90% check passed for "
1037+ f"{ tc } .{ base_metric } (VM: { vm_size } ): { eval_msg } "
1038+ )
1039+ else :
10271040 eval_msg = (
10281041 f"\u2717 { base_metric } : peak { peak :.3f} Gbps did not reach "
10291042 f"90% of SKU max { sku_bw :.3f} Gbps "
@@ -1033,27 +1046,31 @@ def _finalize_bw_peak_checks(self, test_case_name: str) -> None:
10331046 f"[BwPeak] SKU 90% check failed for "
10341047 f"{ tc } .{ base_metric } (VM: { vm_size } ): { eval_msg } "
10351048 )
1036- last_msg = state ["last_msg" ]
1037- result : Dict [str , Any ] = {
1038- "timestamp" : (str (last_msg .time ) if last_msg .time else "" ),
1039- "test_case_name" : tc ,
1040- "metric_name" : base_metric ,
1041- "metric_value" : peak ,
1042- "metric_unit" : last_msg .metric_unit ,
1043- "metric_relativity" : (
1044- last_msg .metric_relativity .value
1045- if last_msg .metric_relativity
1046- else "NA"
1047- ),
1048- "tool" : last_msg .tool ,
1049- "platform" : last_msg .platform ,
1050- "vmsize" : last_msg .vmsize ,
1051- "role" : last_msg .role ,
1052- "criteria_defined" : True ,
1053- "criteria_met" : False ,
1054- "evaluation_message" : eval_msg ,
1055- }
1056- self ._evaluation_results .append (result )
1049+ # SKU-90% is a per-metric aggregate verdict (no driving
1050+ # perf_message); _evaluate_perf_metric records per-message rows
1051+ # separately, so this is not a duplicate. Append for both pass
1052+ # and fail to keep finalize() summary counts symmetric.
1053+ result : Dict [str , Any ] = {
1054+ "timestamp" : (str (last_msg .time ) if last_msg .time else "" ),
1055+ "test_case_name" : tc ,
1056+ "metric_name" : base_metric ,
1057+ "metric_value" : peak ,
1058+ "metric_unit" : last_msg .metric_unit ,
1059+ "metric_relativity" : (
1060+ last_msg .metric_relativity .value
1061+ if last_msg .metric_relativity
1062+ else "NA"
1063+ ),
1064+ "tool" : last_msg .tool ,
1065+ "platform" : last_msg .platform ,
1066+ "vmsize" : last_msg .vmsize ,
1067+ "role" : last_msg .role ,
1068+ "criteria_defined" : True ,
1069+ "criteria_met" : criteria_met ,
1070+ "evaluation_message" : eval_msg ,
1071+ }
1072+ self ._evaluation_results .append (result )
1073+ if not criteria_met :
10571074 failed : Dict [str , Any ] = {
10581075 "metric_name" : base_metric ,
10591076 "actual_value" : peak ,
@@ -1062,12 +1079,6 @@ def _finalize_bw_peak_checks(self, test_case_name: str) -> None:
10621079 "vm_size" : vm_size ,
10631080 }
10641081 self ._failed_metrics .setdefault (tc , []).append (failed )
1065- else :
1066- self ._log .info (
1067- f"[BwPeak] SKU 90% check passed for "
1068- f"{ tc } .{ base_metric } (VM: { vm_size } ): "
1069- f"peak { peak :.3f} >= { required :.3f} Gbps"
1070- )
10711082 keys_to_remove .append (tracker_key )
10721083
10731084 for tracker_key in keys_to_remove :
0 commit comments