Moving clipping of BitRate to 100 Gbps
Change-Id: I9b5dd93ccc0a31614cd48adcf3e227cc498c4f2a
diff --git a/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java b/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java
index 4a5d2fc..a8deff3 100644
--- a/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java
+++ b/core/api/src/main/java/org/onosproject/ui/topo/TopoUtils.java
@@ -99,14 +99,14 @@
/**
* Returns a value representing a count of bits per second,
- * (clipped to a maximum of 10 Gbps).
+ * (clipped to a maximum of 100 Gbps).
* Note that the input is bytes per second.
*
* @param bytes bytes per second
* @return value representing bits per second
*/
public static ValueLabel formatClippedBitRate(long bytes) {
- return new ValueLabel(bytes * 8, BITS_UNIT).perSec().clipG(10.0);
+ return new ValueLabel(bytes * 8, BITS_UNIT).perSec().clipG(100.0);
}
/**
diff --git a/core/api/src/test/java/org/onosproject/ui/topo/TopoUtilsTest.java b/core/api/src/test/java/org/onosproject/ui/topo/TopoUtilsTest.java
index 19f1495..1dc8fc3 100644
--- a/core/api/src/test/java/org/onosproject/ui/topo/TopoUtilsTest.java
+++ b/core/api/src/test/java/org/onosproject/ui/topo/TopoUtilsTest.java
@@ -207,9 +207,9 @@
@Test
public void formatClippedBitsGigaExceedThreshold() {
- vl = TopoUtils.formatClippedBitRate(5_000_000_000L);
- // approx. 37.25 Gbps
- assertEquals(AM_WL, "10 Gbps", vl.toString());
+ vl = TopoUtils.formatClippedBitRate(15_000_000_000L);
+ // approx. 111.75 Gbps
+ assertEquals(AM_WL, "100 Gbps", vl.toString());
assertTrue(AM_NCL, vl.clipped());
}