summaryrefslogtreecommitdiff
path: root/dev/sinic.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-01-19 18:40:02 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-01-19 18:40:02 -0500
commit886f905785561372413ea95dc551a0f269e28bac (patch)
treed0cb28d1a130db3009f5ce97321a0c6610cd5f70 /dev/sinic.cc
parent3040d2a9feb0e1513e631859c4f32bb1a997a62e (diff)
downloadgem5-886f905785561372413ea95dc551a0f269e28bac.tar.xz
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
Diffstat (limited to 'dev/sinic.cc')
-rw-r--r--dev/sinic.cc31
1 files changed, 31 insertions, 0 deletions
diff --git a/dev/sinic.cc b/dev/sinic.cc
index 56782b589..fa4cd570f 100644
--- a/dev/sinic.cc
+++ b/dev/sinic.cc
@@ -191,6 +191,34 @@ Device::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)
+ ;
+
txBytes
.name(name() + ".txBytes")
.desc("Bytes Transmitted")
@@ -258,6 +286,9 @@ Device::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;
}