summaryrefslogtreecommitdiff
path: root/dev/ns_gige.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-01-19 18:40:09 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-01-19 18:40:09 -0500
commit29789443ba5471c954617d8a21f5db94c6512f02 (patch)
treeb263b74cf25886e9e44633f37ae1b81087bc781d /dev/ns_gige.cc
parentdb00ac3bc6bc1a7f295c662ba12541579a975084 (diff)
parent886f905785561372413ea95dc551a0f269e28bac (diff)
downloadgem5-29789443ba5471c954617d8a21f5db94c6512f02.tar.xz
Merge zizzer:/bk/m5 into zeep.eecs.umich.edu:/z/saidi/work/m5
--HG-- extra : convert_revision : d5e6f6e696d7607f89894856d940afc89ae8e37b
Diffstat (limited to 'dev/ns_gige.cc')
-rw-r--r--dev/ns_gige.cc33
1 files changed, 32 insertions, 1 deletions
diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc
index e799c10d2..db1474d1c 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;
}