forest-net
an overlay networks for large-scale virtual worlds
|
Classes | |
struct | LinkCounts |
struct | QueueCounts |
struct | StatItem |
Public Member Functions | |
StatsModule (int, int, int, ComtreeTable *) | |
int | iPktCnt (int) |
int | oPktCnt (int) |
int | discCnt (int) |
int | qDiscCnt (int) |
int | iByteCnt (int) |
int | oByteCnt (int) |
int | getQlen (int) |
int | getQbytes (int) |
int | getLinkQlen (int) |
void | clearLnkStats (int) |
void | clearQuStats (int) |
void | cntInLink (int, int, bool) |
void | cntOutLink (int, int, bool) |
void | cntDiscards (int, int, bool) |
void | incQlen (int, int, int) |
void | decQlen (int, int, int) |
void | record (uint64_t) |
bool | read (istream &) |
string | toString () |
Create a string representing the stats module. More... | |
Private Types | |
enum | cntrTyp { inPkt, outPkt, inByt, outByt, qPkt, qByt, disc } |
Private Member Functions | |
bool | readStat (istream &) |
Read an entry from in and store it in the stats table. More... | |
string | stat2string (int) const |
Create a string representing an entry in the table. More... | |
Private Attributes | |
int | maxStats |
int | maxLnk |
int | maxQ |
int | n |
mutex | mtx |
StatItem * | stat |
ofstream | fs |
LinkCounts * | lnkCnts |
QueueCounts * | qCnts |
int | totInByte |
int | totInPkt |
int | totDiscards |
int | rtrInByte |
int | rtrInPkt |
int | leafInByte |
int | leafInPkt |
int | totOutByte |
int | totOutPkt |
int | rtrOutByte |
int | rtrOutPkt |
int | rtrDiscards |
int | leafOutByte |
int | leafOutPkt |
int | leafDiscards |
ComtreeTable * | ctt |
Definition at line 17 of file StatsModule.h.
|
private |
Read an entry from in and store it in the stats table.
Return true on success false on failure. A line is a pure comment line if it starts with a # sign. A trailing comment is also allowed at the end of a line by including a # sign. All lines that are not pure comment lines or blank are assumed to contain a complete statistics request. Each entry consists of a type string and one or more additional arguments that depend on the type. The full list is given below.
inPkt L number of packets received on input link L outPkt L number of packets sent on output link L inByt L number of bytes received on input link L outByt L number of bytes sent on output link L qPkt L C number of packets for comtree C output link L qByt L C number of bytes for comtree C on output link L disc L C number of packets discarded for comtree C on link L
If inPkt, outPkt, inByt, outByt are given with a link # of 0, the statistics for the router as a whole are reported. If the link # is -1, the statistics for packets to/from other routers is reported. If the link # is -2, the statistics for packets to/from leaf nodes is reported. In the queue packet length statistics, if the given comtree number is zero, then the total number of packets (bytes) queued for the given link (over all queues) is reported. Similarly, for the discard statistic, a comtree of 0 reports all discards for the link.
Definition at line 144 of file StatsModule.cpp.
|
private |
Create a string representing an entry in the table.
i | is the index of an entry |
i | is the index of an entry |
s | is a reference to a string in which result is returned |
Definition at line 206 of file StatsModule.cpp.
string & forest::StatsModule::toString | ( | ) |
Create a string representing the stats module.
s | is a reference to a string in which the result is returned |
Definition at line 243 of file StatsModule.cpp.