Commit e96e7acb authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Refactor TE metrics aggregation to use maximum bandwidth for link calculations

parent 6589db39
Loading
Loading
Loading
Loading
+4 −4
Changes for src/tests/tools/simap_server/simap_client/SimapMetricsGenerator.py: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ class SimapMetricsGenerator:
    ) -> Dict[str, Tuple[float, float]]:
        """
        Aggregate TE metrics into abstract layer metrics.
        BW: average, Latency: sum
        BW utilisation: maximum supporting link, Latency: sum
        
        Returns:
            Dict with 'Trans-L1', 'AggNet-L1', 'E2E-L1' metrics
@@ -156,15 +156,15 @@ class SimapMetricsGenerator:
        bw_L13, lat_L13 = te_metrics['L13']

        # Trans-L1: L5 + L9
        bw_trans  = (bw_L5 + bw_L9) / 2
        bw_trans  = max(bw_L5, bw_L9)
        lat_trans = lat_L5 + lat_L9

        # AggNet-L1: L3 + Trans-L1 + L13
        bw_aggnet  = (bw_L3 + bw_trans + bw_L13) / 3
        bw_aggnet  = max(bw_L3, bw_trans, bw_L13)
        lat_aggnet = lat_L3 + lat_trans + lat_L13

        # E2E-L1: L1 + AggNet-L1
        bw_e2e  = (bw_L1 + bw_aggnet) / 2
        bw_e2e  = max(bw_L1, bw_aggnet)
        lat_e2e = lat_L1 + lat_aggnet

        return {