Additional stat tracking for data processing.
[distributedratelimiting.git] / drl / common_accounting.h
index d656d8a..fc8e75e 100644 (file)
@@ -74,6 +74,29 @@ typedef struct {
     /** The number of bytes sent since the last_update time. */
     uint32_t bytes_since;
 
+    /* Statistics below. */
+
+    /** The current number of flows. */
+    uint32_t num_flows;
+
+    /** The number of flows sending above 5KB/s. */
+    uint32_t num_flows_5k;
+
+    /** The number of flows sending above 10KB/s. */
+    uint32_t num_flows_10k;
+
+    /** The number of flows sending above 20KB/s. */
+    uint32_t num_flows_20k;
+
+    /** The number of flows sending above 50KB/s. */
+    uint32_t num_flows_50k;
+
+    /** The average flow rate. */
+    uint32_t avg_rate;
+
+    /** The hash of the flow whose rate is the max_flow_rate. */
+    uint32_t max_flow_rate_flow_hash;
+
 } common_accounting_t;
 
 /** Determines the difference between two timeval structs (in seconds, with