NB API for packet count statistics. analytics.py demonstrates how to use it.
[affinity.git] / analytics / northbound / src / main / java / org / opendaylight / affinity / analytics / northbound / Statistics.java
index 5e911124218a2641d7db5f7caac42097473cc07b..b025d6099800d6403cf3bb16fe6b4cd575a5f17c 100644 (file)
@@ -19,6 +19,10 @@ public class Statistics {
     @XmlElement
     private long byteCount;
     @XmlElement
+    private long packetCount;
+    @XmlElement
+    private double duration;
+    @XmlElement
     private double bitRate;
 
     // To satisfy JAXB
@@ -26,9 +30,11 @@ public class Statistics {
     private Statistics() {
     }
 
-    public Statistics(long byteCount, double bitRate) {
+    public Statistics(long byteCount, long packetCount, double duration, double bitRate) {
         super();
         this.byteCount = byteCount;
+        this.packetCount = packetCount;
+        this.duration = duration;
         this.bitRate = bitRate;
     }
 
@@ -40,6 +46,22 @@ public class Statistics {
         this.byteCount = byteCount;
     }
 
+    public long getPacketCount() {
+        return this.packetCount;
+    }
+
+    public void setPacketCount(long packetCount) {
+        this.packetCount = packetCount;
+    }
+
+    public double getDuration() {
+        return this.duration;
+    }
+
+    public void setDuration(double duration) {
+        this.duration = duration;
+    }
+
     public double getBitRate() {
         return this.bitRate;
     }