Commit 7645ea0
committed
Show LAG in path trace, fix gateway WAN port speed regression (#511)
* Show Link Aggregation info in speed test path trace tooltip
Adds LAG membership detection as a post-processing step after path
building. When a link between two devices uses a LAG, the connector
tooltip now shows "Link Aggregation: 2x 10 Gbps" (or similar).
Purely additive - annotates new fields on NetworkHop after the path
is fully built, never modifies existing speed or path logic.
Closes #349
* Add comprehensive chain walk diagnostic logging (temporary)
* Skip LocalUplinkPort fallback for gateways (WAN port, not LAN)
Gateway devices have LocalUplinkPort pointing to the WAN port.
When the primary speed lookup returned 0 (ISP device not in UniFi),
the fallback picked up the WAN port speed (e.g., 5 Gbps) instead of
leaving it at 0 for the other side of the link to resolve.
Confirmed via diagnostic logging:
- Gateway test: BuildHopList target fallback fired on gateway WAN port
- Inter-VLAN test: chain walk egress fallback fired on gateway WAN port
Guarded all 4 LocalUplinkPort fallback sites with gateway type check.
* Add comprehensive path trace test harness with TopologyBuilder
Fluent TopologyBuilder for constructing test network topologies with
mixed link speeds, LAG, wireless mesh, and inter-VLAN routing.
23 test cases covering:
- Simple wired paths with mixed speeds (10G/2.5G/1G)
- Gateway as target (regression test for WAN port fallback)
- Inter-VLAN routing through gateway
- Wi-Fi client with asymmetric TX/RX rates
- Mesh AP backhaul with signal/band/channel
- LAG aggregate links (2x10G)
- Daisy-chain switches with bottlenecks at different layers
- Same-switch paths
- AP with empty port table fallback
* Add mid-path bottleneck tests for all trace types
5 new tests with slow links sandwiched between faster ones:
- 10G-10G-1G-10G-5G direct path
- 2.5G sandwiched by 10G
- Inter-VLAN with 1G bottleneck between 10G links
- Gateway as target with 1G mid-path bottleneck
- Same-VLAN direct path with 1G switching bottleneck (no gateway)
* Remove temporary diagnostic logging1 parent 08e4ca1 commit 7645ea0
5 files changed
Lines changed: 1885 additions & 12 deletions
File tree
- src
- NetworkOptimizer.UniFi
- Models
- tests/NetworkOptimizer.UniFi.Tests
- Fixtures
- PathTrace
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
95 | 113 | | |
96 | 114 | | |
97 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
508 | 511 | | |
509 | 512 | | |
510 | 513 | | |
| |||
597 | 600 | | |
598 | 601 | | |
599 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
600 | 606 | | |
601 | 607 | | |
602 | 608 | | |
| |||
794 | 800 | | |
795 | 801 | | |
796 | 802 | | |
797 | | - | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
798 | 806 | | |
799 | 807 | | |
800 | 808 | | |
| |||
867 | 875 | | |
868 | 876 | | |
869 | 877 | | |
870 | | - | |
871 | | - | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
872 | 881 | | |
873 | 882 | | |
874 | 883 | | |
| |||
903 | 912 | | |
904 | 913 | | |
905 | 914 | | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
906 | 918 | | |
907 | 919 | | |
908 | 920 | | |
| |||
1293 | 1305 | | |
1294 | 1306 | | |
1295 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1296 | 1380 | | |
1297 | 1381 | | |
1298 | 1382 | | |
| |||
1637 | 1721 | | |
1638 | 1722 | | |
1639 | 1723 | | |
1640 | | - | |
1641 | | - | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
1642 | 1728 | | |
1643 | 1729 | | |
1644 | 1730 | | |
| |||
1993 | 2079 | | |
1994 | 2080 | | |
1995 | 2081 | | |
1996 | | - | |
1997 | | - | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
1998 | 2085 | | |
1999 | 2086 | | |
2000 | 2087 | | |
| |||
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
890 | 904 | | |
891 | 905 | | |
892 | 906 | | |
893 | 907 | | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
| 908 | + | |
898 | 909 | | |
899 | 910 | | |
900 | | - | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
901 | 915 | | |
902 | 916 | | |
903 | 917 | | |
| |||
0 commit comments