summaryrefslogtreecommitdiffstats
path: root/src/stateless/cp/trex_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/stateless/cp/trex_stream.h')
-rw-r--r--src/stateless/cp/trex_stream.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/stateless/cp/trex_stream.h b/src/stateless/cp/trex_stream.h
index 0634829e..3e48d7e4 100644
--- a/src/stateless/cp/trex_stream.h
+++ b/src/stateless/cp/trex_stream.h
@@ -90,7 +90,7 @@ public:
m_next_stream_id = next_stream_id;
}
- double get_pps() {
+ double get_pps() const {
return m_pps;
}
@@ -150,6 +150,16 @@ public:
return (dp);
}
+
+ double get_burst_length_usec() const {
+ return ( (m_burst_total_pkts / m_pps) * 1000 * 1000);
+ }
+
+ double get_bps() const {
+ /* packet length + 4 CRC bytes to bits and multiplied by PPS */
+ return (m_pps * (m_pkt.len + 4) * 8);
+ }
+
void Dump(FILE *fd);
public:
/* basic */