test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] framework support get oversize for performance
@ 2015-01-26  9:19 Xiaonan Zhang
  2015-01-27  1:34 ` Liu, Yong
  0 siblings, 1 reply; 4+ messages in thread
From: Xiaonan Zhang @ 2015-01-26  9:19 UTC (permalink / raw)
  To: dts

From: "xiaonanx.zhang" <xiaonanx.zhang@intel.com>

modify get_transmission_results function in framework etgen.py
use ixia api stat cget -oversize to get Oversize and CRC Errors

add return get oversize condition

Signed-off-by: xiaonanx.zhang <xiaonanx.zhang@intel.com>
---
 framework/etgen.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/framework/etgen.py b/framework/etgen.py
index 2f2e975..f2da4ab 100644
--- a/framework/etgen.py
+++ b/framework/etgen.py
@@ -581,13 +581,18 @@ class IxiaPacketGenerator(SSHConnection):
             out = self.send_expect("stat cget -bitsReceived", '% ', 10)
             self.logger.debug("port %d bits rate:" % (port) + out)
             bpsRate += int(out.strip())
+            out = self.send_expect("stat cget -oversize", '%', 10)
+            oversize += int(out.strip())
 
         self.logger.info("Rate: %f Mpps" % (rate * 1.0 / 1000000))
         self.logger.info("Mbps rate: %f Mbps" % (bpsRate * 1.0 / 1000000))
 
         self.send_expect("ixStopTransmit portList", "%", 30)
 
-        return (bpsRate, rate)
+        if rate == 0 and oversize > 0:
+            return (bpsRate, oversize)
+        else:
+            return (bpsRate, rate)
 
     def config_ixia_dcb_init(self, rxPort, txPort):
         """
-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-27  3:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26  9:19 [dts] [PATCH] framework support get oversize for performance Xiaonan Zhang
2015-01-27  1:34 ` Liu, Yong
2015-01-27  2:45   ` Zhang, XiaonanX
2015-01-27  3:06     ` Liu, Yong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).