diff options
author | 2016-06-05 11:15:48 +0300 | |
---|---|---|
committer | 2016-06-05 11:15:48 +0300 | |
commit | 56b55266e24255facdd9e4d604e628399debabb1 (patch) | |
tree | 1985fd912472e743e111e89183152e57d64e61aa | |
parent | 6d5144308445cb02373056668e3df5d962dc424c (diff) |
cpu utilization: replace using static with resize vector.
-rw-r--r-- | src/main_dpdk.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index f0c9c7e1..ffae5caa 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -5769,11 +5769,10 @@ int TrexDpdkPlatformApi::get_active_pgids(flow_stat_active_t &result) const { } int TrexDpdkPlatformApi::get_cpu_util_full(cpu_util_full_t &cpu_util_full) const { - static cpu_vct_t cpu_vct; + cpu_util_full.resize((int)g_trex.m_fl.m_threads_info.size()); for (int thread_id=0; thread_id<(int)g_trex.m_fl.m_threads_info.size(); thread_id++) { CFlowGenListPerThread * lp=g_trex.m_fl.m_threads_info[thread_id]; - cpu_util_full.push_back(cpu_vct); - lp->m_cpu_cp_u.GetHistory(cpu_util_full.back()); + lp->m_cpu_cp_u.GetHistory(cpu_util_full[thread_id]); } return 0; } |