summaryrefslogtreecommitdiffstats
path: root/src/flow_stat.cpp
diff options
context:
space:
mode:
authorIdo Barnea <ibarnea@cisco.com>2016-05-16 16:25:21 +0300
committerIdo Barnea <ibarnea@cisco.com>2016-05-18 19:23:47 +0300
commit9ba34d62a9faed8fb782062c58c3d746ce56a107 (patch)
tree624f92b1579812a0b7dc1db7a682e1b0aa4c170d /src/flow_stat.cpp
parentc38d567b84cc9c8a5c2f88a598c89bbbb9b3279b (diff)
json fixes
Diffstat (limited to 'src/flow_stat.cpp')
-rw-r--r--src/flow_stat.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flow_stat.cpp b/src/flow_stat.cpp
index 575e66e0..feb7276a 100644
--- a/src/flow_stat.cpp
+++ b/src/flow_stat.cpp
@@ -858,7 +858,7 @@ int CFlowStatRuleMgr::stop_stream(TrexStream * stream) {
m_hw_id_map.unmap(hw_id);
} else {
CFlowStatUserIdInfoPayload *p_user_id_p = (CFlowStatUserIdInfoPayload *)p_user_id;
- std::string json;
+ Json::Value json;
m_api->get_rfc2544_info(&rfc2544_info, hw_id, hw_id, true);
p_user_id_p->set_jitter(rfc2544_info.get_jitter());
rfc2544_info.get_latency_json(json);
@@ -1043,14 +1043,14 @@ bool CFlowStatRuleMgr::dump_json(std::string & s_json, std::string & l_json, boo
if (user_id_info->rfc2544_support()) {
CFlowStatUserIdInfoPayload *user_id_info_p = (CFlowStatUserIdInfoPayload *)user_id_info;
// payload object. Send also latency, jitter...
- std::string lat_hist;
+ Json::Value lat_hist;
if (user_id_info->is_hw_id()) {
// if mapped to hw_id, take info from what we just got from rx core
uint16_t hw_id = user_id_info->get_hw_id();
rfc2544_info[hw_id].get_latency_json(lat_hist);
user_id_info_p->set_seq_err_cnt(rfc2544_info[hw_id].get_seq_err_cnt());
user_id_info_p->set_ooo_cnt(rfc2544_info[hw_id].get_ooo_cnt());
- l_data_section[str_user_id]["latency"]["histogram"] = lat_hist;
+ l_data_section[str_user_id]["latency"] = lat_hist;
l_data_section[str_user_id]["latency"]["last_max"] = rfc2544_info[hw_id].get_last_max();
l_data_section[str_user_id]["jitter"] = rfc2544_info[hw_id].get_jitter();
} else {