summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-06-05 13:13:00 +0300
committerYaroslav Brustinov <ybrustin@cisco.com>2016-06-05 13:13:00 +0300
commit9b8f4554f63056ef214053b41ec31c3d3a75125b (patch)
tree35873da95101c7a653c6756bb10902c600c23d94
parent56b55266e24255facdd9e4d604e628399debabb1 (diff)
cpu utilization - syntax fixes
-rw-r--r--src/rpc-server/commands/trex_rpc_cmd_general.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/rpc-server/commands/trex_rpc_cmd_general.cpp b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
index 37eafef8..27010e0e 100644
--- a/src/rpc-server/commands/trex_rpc_cmd_general.cpp
+++ b/src/rpc-server/commands/trex_rpc_cmd_general.cpp
@@ -164,15 +164,17 @@ TrexRpcCmdGetUtilization::_run(const Json::Value &params, Json::Value &result) {
Json::Value &section = result["result"];
- if (get_stateless_obj()->get_platform_api()->get_mbuf_util(section) != 0)
+ if (get_stateless_obj()->get_platform_api()->get_mbuf_util(section) != 0) {
return TREX_RPC_CMD_INTERNAL_ERR;
+ }
- if (get_stateless_obj()->get_platform_api()->get_cpu_util_full(cpu_util_full) != 0)
+ if (get_stateless_obj()->get_platform_api()->get_cpu_util_full(cpu_util_full) != 0) {
return TREX_RPC_CMD_INTERNAL_ERR;
+ }
for (int thread_id = 0; thread_id < cpu_util_full.size(); thread_id++) {
for (int history_id = 0; history_id < cpu_util_full[thread_id].size(); history_id++) {
- section["cpu"][thread_id].append(cpu_util_full.at(thread_id).at(history_id));
+ section["cpu"][thread_id].append(cpu_util_full[thread_id][history_id]);
}
}
return (TREX_RPC_CMD_OK);