From 886f905785561372413ea95dc551a0f269e28bac Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Wed, 19 Jan 2005 18:40:02 -0500 Subject: added total bytes/bandwidth/packets formulas to nics cleaned up stability code and wrote some better help for stats.py fixed sample bug in info.py dev/ns_gige.cc: dev/ns_gige.hh: dev/sinic.cc: dev/sinic.hh: add total bandwidth/packets/bytes stats util/stats/info.py: fixed samples bug util/stats/stats.py: cleaned up stability code and wrote a bit better help --HG-- extra : convert_revision : cae06f4fac744d7a51ee0909f21f03509151ea8f --- dev/ns_gige.cc | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'dev/ns_gige.cc') diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc index aa47436f7..613677875 100644 --- a/dev/ns_gige.cc +++ b/dev/ns_gige.cc @@ -244,7 +244,6 @@ NSGigE::regStats() .precision(0) ; - txBandwidth .name(name() + ".txBandwidth") .desc("Transmit Bandwidth (bits/s)") @@ -259,6 +258,34 @@ NSGigE::regStats() .prereq(rxBytes) ; + totBandwidth + .name(name() + ".totBandwidth") + .desc("Total Bandwidth (bits/s)") + .precision(0) + .prereq(totBytes) + ; + + totPackets + .name(name() + ".totPackets") + .desc("Total Packets") + .precision(0) + .prereq(totBytes) + ; + + totBytes + .name(name() + ".totBytes") + .desc("Total Bytes") + .precision(0) + .prereq(totBytes) + ; + + totPacketRate + .name(name() + ".totPPS") + .desc("Total Tranmission Rate (packets/s)") + .precision(0) + .prereq(totBytes) + ; + txPacketRate .name(name() + ".txPPS") .desc("Packet Tranmission Rate (packets/s)") @@ -449,6 +476,10 @@ NSGigE::regStats() txBandwidth = txBytes * Stats::constant(8) / simSeconds; rxBandwidth = rxBytes * Stats::constant(8) / simSeconds; + totBandwidth = txBandwidth + rxBandwidth; + totBytes = txBytes + rxBytes; + totPackets = txPackets + rxPackets; + txPacketRate = txPackets / simSeconds; rxPacketRate = rxPackets / simSeconds; } -- cgit v1.2.3