|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openflow.gui.stats.PortStats
org.openflow.gui.stats.PortStatsRates
public class PortStatsRates
Augments PortStats by keeping track of the rates of packets, bits, and flows.
| Field Summary | |
|---|---|
protected double |
bitsPerSec
rate of bits per second |
protected double |
flowsPerSec
rate of flows per second |
protected double |
packetsPerSec
rate of packets per second |
protected double |
weightOfNew
weight of new rates relative to previous rates |
| Fields inherited from class org.openflow.gui.stats.PortStats |
|---|
numBytes, numFlows, numPackets, updateTime |
| Constructor Summary | |
|---|---|
PortStatsRates(Match m)
|
|
PortStatsRates(Match m,
double weightOfNew)
|
|
| Method Summary | |
|---|---|
double |
getBitsPerSec()
Gets the number of bits per second for these stats |
double |
getFlowsPerSec()
Gets the number of flows per second for these stats |
double |
getPacketsPerSec()
Gets the number of packets per second for these stats |
double |
getWeightOfNew()
Gets how strongly new rates are weighted over the previous weight |
void |
setRates(double packetsPerSec,
double bitsPerSec,
double flowsPerSec,
long when)
update the rates directly |
void |
setWeightOfNew(double w)
Sets how strongly new rates are weighted over the previous weight. |
java.lang.String |
toString()
includes the last update time and the current rates |
void |
update(long packetCount,
long byteCount,
int flowCount,
long when)
update the statistics with the specified values and recompute rates |
| Methods inherited from class org.openflow.gui.stats.PortStats |
|---|
getByteCount, getFlowCount, getLastUpdateTime, getPacketCount, update, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected double packetsPerSec
protected double bitsPerSec
protected double flowsPerSec
protected double weightOfNew
| Constructor Detail |
|---|
public PortStatsRates(Match m)
public PortStatsRates(Match m,
double weightOfNew)
| Method Detail |
|---|
public double getPacketsPerSec()
public double getBitsPerSec()
public double getFlowsPerSec()
public double getWeightOfNew()
public void setWeightOfNew(double w)
w - will be clamped to the range of 0.0 to 1.0 inclusive
public void setRates(double packetsPerSec,
double bitsPerSec,
double flowsPerSec,
long when)
public void update(long packetCount,
long byteCount,
int flowCount,
long when)
update in class PortStatspublic java.lang.String toString()
toString in class PortStats
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||