Skip to content

Commit

Permalink
Merge pull request #717 from MicheleIessi/utilization-link-cost
Browse files Browse the repository at this point in the history
Fixed link cost calculation
  • Loading branch information
Ryan Izard committed Sep 22, 2016
2 parents ec9cf1e + ffa7810 commit 00e1d94
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ public Map<Link,Integer> initLinkCostMap() {

if ((bpsTx / 10^6) / 8 > 1) {
int cost = (int) (bpsTx / 10^6) / 8;
linkCost.put(link, ((1/cost)*1000));
linkCost.put(link, cost);
} else {
linkCost.put(link, MAX_LINK_WEIGHT);
}
Expand Down Expand Up @@ -1430,4 +1430,4 @@ public Set<NodePortTuple> getBroadcastPortsInArchipelago(DatapathId sw) {
public Set<DatapathId> getArchipelagoIds() {
return archipelagos.stream().map(a -> a.getId()).collect(Collectors.toSet());
}
}
}

0 comments on commit 00e1d94

Please sign in to comment.