aboutsummaryrefslogtreecommitdiffstats
path: root/extras/vom
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-05-16 15:01:34 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-05-22 09:43:49 +0000
commit233e4681830bc2a9cd40deb4b5909b4e310d1a2a (patch)
tree495c36ffbafdfaf8c85672024e2162ea8ee923ac /extras/vom
parenta29d18ae6bb7cda3923693a052c3b9208588be8e (diff)
stats: support multiple works for error counters
The current code only allowed access to the main thread error counters. That is not so useful for a multi worker instance. No return a vector indexed by thread of counter_t values. Type: fix Change-Id: Ie322c8889c0c8175e1116e71de04a2cf453b9ed7 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'extras/vom')
-rw-r--r--extras/vom/vom/stat_client.cpp6
-rw-r--r--extras/vom/vom/stat_client.hpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/extras/vom/vom/stat_client.cpp b/extras/vom/vom/stat_client.cpp
index a413d6763f0..394c6eeee96 100644
--- a/extras/vom/vom/stat_client.cpp
+++ b/extras/vom/vom/stat_client.cpp
@@ -32,7 +32,7 @@ stat_client::stat_data_t::stat_data_t(const stat_segment_data_t& stat_seg_data)
m_combined_counter_vec = stat_seg_data.combined_counter_vec;
break;
case STAT_DIR_TYPE_ERROR_INDEX:
- m_error_value = stat_seg_data.error_value;
+ m_error_vec = stat_seg_data.error_vector;
break;
case STAT_DIR_TYPE_NAME_VECTOR:
break;
@@ -59,10 +59,10 @@ stat_client::stat_data_t::get_stat_segment_scalar_data() const
return m_scalar_value;
}
-uint64_t
+uint64_t*
stat_client::stat_data_t::get_stat_segment_error_data() const
{
- return m_error_value;
+ return m_error_vec;
}
uint64_t**
diff --git a/extras/vom/vom/stat_client.hpp b/extras/vom/vom/stat_client.hpp
index 8e014da19b1..f1745c87b20 100644
--- a/extras/vom/vom/stat_client.hpp
+++ b/extras/vom/vom/stat_client.hpp
@@ -56,7 +56,7 @@ public:
* Get pointer to actual data
*/
double get_stat_segment_scalar_data() const;
- uint64_t get_stat_segment_error_data() const;
+ uint64_t* get_stat_segment_error_data() const;
uint64_t** get_stat_segment_simple_counter_data() const;
vlib_counter_t** get_stat_segment_combined_counter_data() const;
@@ -77,7 +77,7 @@ public:
union
{
double m_scalar_value;
- uint64_t m_error_value;
+ counter_t* m_error_vec;
counter_t** m_simple_counter_vec;
vlib_counter_t** m_combined_counter_vec;
};