summaryrefslogtreecommitdiffstats
path: root/src/main_dpdk.cpp
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-12-13 16:29:47 +0200
committerIdo Barnea <ibarnea@cisco.com>2016-12-13 16:29:47 +0200
commitdc546861c7e74b830a17e1bfe83252c67b70444f (patch)
treef9f438e6afef3847f909c1c5989a6301bbdaeefe /src/main_dpdk.cpp
parent523b9dc5e4b2b8ee9abbe60175416b8a3c41f5e8 (diff)
In stateful, print latency stats only if given -l != 0
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
Diffstat (limited to 'src/main_dpdk.cpp')
-rw-r--r--src/main_dpdk.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp
index 68c2d34e..3466572c 100644
--- a/src/main_dpdk.cpp
+++ b/src/main_dpdk.cpp
@@ -4507,18 +4507,20 @@ CGlobalTRex::handle_slow_path() {
m_mg.update();
if ( m_io_modes.m_g_mode == CTrexGlobalIoMode::gNORMAL ) {
- switch (m_io_modes.m_l_mode) {
- case CTrexGlobalIoMode::lDISABLE:
- fprintf(stdout,"\n+Latency stats disabled \n");
- break;
- case CTrexGlobalIoMode::lENABLE:
- fprintf(stdout,"\n-Latency stats enabled \n");
- m_mg.DumpShort(stdout);
- break;
- case CTrexGlobalIoMode::lENABLE_Extended:
- fprintf(stdout,"\n-Latency stats extended \n");
- m_mg.Dump(stdout);
- break;
+ if (CGlobalInfo::m_options.m_latency_rate != 0) {
+ switch (m_io_modes.m_l_mode) {
+ case CTrexGlobalIoMode::lDISABLE:
+ fprintf(stdout, "\n+Latency stats disabled \n");
+ break;
+ case CTrexGlobalIoMode::lENABLE:
+ fprintf(stdout, "\n-Latency stats enabled \n");
+ m_mg.DumpShort(stdout);
+ break;
+ case CTrexGlobalIoMode::lENABLE_Extended:
+ fprintf(stdout, "\n-Latency stats extended \n");
+ m_mg.Dump(stdout);
+ break;
+ }
}
if ( get_is_rx_check_mode() ) {