From: Ido Barnea Date: Tue, 13 Dec 2016 14:29:47 +0000 (+0200) Subject: In stateful, print latency stats only if given -l != 0 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=dc546861c7e74b830a17e1bfe83252c67b70444f;p=trex.git In stateful, print latency stats only if given -l != 0 Signed-off-by: Ido Barnea --- 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() ) {