File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -667,20 +667,28 @@ def send_ntttcp_udp_unified_perf_messages(
667667 "relativity" : MetricRelativity .LowerIsBetter ,
668668 "unit" : "cycles/byte" ,
669669 },
670- {
671- "name" : "server_mtu" ,
672- "value" : int (server_mtu ),
673- "relativity" : MetricRelativity .NA ,
674- "unit" : "bytes" ,
675- },
676- {
677- "name" : "client_mtu" ,
678- "value" : int (client_mtu ),
679- "relativity" : MetricRelativity .NA ,
680- "unit" : "bytes" ,
681- },
682670 ]
683671
672+ # Only send MTU metrics if they are valid (not -1)
673+ if client_mtu != - 1 :
674+ metrics .append (
675+ {
676+ "name" : f"client_mtu{ conn_suffix } " ,
677+ "value" : int (client_mtu ),
678+ "relativity" : MetricRelativity .NA ,
679+ "unit" : "bytes" ,
680+ }
681+ )
682+ if server_mtu != - 1 :
683+ metrics .append (
684+ {
685+ "name" : f"server_mtu{ conn_suffix } " ,
686+ "value" : int (server_mtu ),
687+ "relativity" : MetricRelativity .NA ,
688+ "unit" : "bytes" ,
689+ },
690+ )
691+
684692 self ._send_unified_perf_metrics (
685693 metrics , test_case_name , test_result , TransportProtocol .Udp
686694 )
You can’t perform that action at this time.
0 commit comments