diff options
author | Ido Barnea <ibarnea@cisco.com> | 2016-05-16 16:25:21 +0300 |
---|---|---|
committer | Ido Barnea <ibarnea@cisco.com> | 2016-05-18 19:23:47 +0300 |
commit | 9ba34d62a9faed8fb782062c58c3d746ce56a107 (patch) | |
tree | 624f92b1579812a0b7dc1db7a682e1b0aa4c170d /src/flow_stat.h | |
parent | c38d567b84cc9c8a5c2f88a598c89bbbb9b3279b (diff) |
json fixes
Diffstat (limited to 'src/flow_stat.h')
-rw-r--r-- | src/flow_stat.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/flow_stat.h b/src/flow_stat.h index e0e5fe5f..f239044d 100644 --- a/src/flow_stat.h +++ b/src/flow_stat.h @@ -65,11 +65,11 @@ class rfc2544_info_t_ { clear(); } - inline void get_latency_json(std::string & json) const { + inline void get_latency_json(Json::Value & json) const { json = m_latency; } - inline void set_latency_json(std::string json) { + inline void set_latency_json(Json::Value json) { m_latency = json; } @@ -106,7 +106,7 @@ class rfc2544_info_t_ { m_seq_error = 0; m_out_of_order = 0; m_jitter = 0; - m_latency = ""; + m_latency = Json::Value(""); } inline rfc2544_info_t_ operator+ (const rfc2544_info_t_ &t_in) { @@ -146,9 +146,9 @@ class rfc2544_info_t_ { uint64_t m_out_of_order; double m_jitter; dsec_t m_last_max_latency; - // json string of latency. In case of stop/start, we calculate latency graph from scratch, + // json latency object. In case of stop/start, we calculate latency graph from scratch, // so when stopping, we just "freeze" state for reporting by saving the json string - std::string m_latency; + Json::Value m_latency; }; class tx_per_flow_t_ { @@ -286,11 +286,11 @@ class CFlowStatUserIdInfoPayload : public CFlowStatUserIdInfo { m_seq_error_base = 0; m_out_of_order_base = 0; } - inline void get_latency_json(std::string & json) const { + inline void get_latency_json(Json::Value & json) const { json = m_rfc2544_info.m_latency; } - inline void set_latency_json(std::string json) { + inline void set_latency_json(Json::Value json) { m_rfc2544_info.m_latency = json; } |