|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
21 : m_name(stat_seg_data.
name)
22 , m_type(stat_seg_data.
type)
61 return m_scalar_value;
73 return m_simple_counter_vec;
79 return m_combined_counter_vec;
83 : m_socket_name(socket_name)
85 , m_stat_connect(
false)
87 , m_stat_seg_data(nullptr)
90 m_patterns.push_back(
"/if");
94 : m_socket_name(
"/run/vpp/stats.sock")
96 , m_stat_connect(
false)
98 , m_stat_seg_data(nullptr)
103 std::vector<std::string> patterns)
104 : m_socket_name(socket_name)
105 , m_patterns(patterns)
106 , m_stat_connect(
false)
108 , m_stat_seg_data(nullptr)
113 : m_socket_name(
"/run/vpp/stats.sock")
115 , m_stat_connect(
false)
117 , m_stat_seg_data(nullptr)
120 m_patterns.push_back(
"/if");
132 : m_socket_name(o.m_socket_name)
133 , m_patterns(o.m_patterns)
140 m_stat_connect =
true;
143 return m_stat_connect;
151 m_stat_connect =
false;
161 stat_client::vec_free(
void* vec)
169 uint8_t** string_vec = { 0 };
170 for (
auto& pattern : m_patterns) {
181 m_stat_seg_data = NULL;
182 if (m_stat_data.size()) {
185 if (m_stat_connect) {
187 if (!m_stat_seg_data) {
193 m_stat_data.push_back(sd);
203 m_stat_seg_data = NULL;
204 if (m_stat_data.size()) {
207 if (m_stat_connect) {
209 if (!m_stat_seg_data) {
215 m_stat_data.push_back(sd);
222 stat_client::data_free()
@ STAT_DIR_TYPE_COUNTER_VECTOR_COMBINED
void stat_segment_vec_free(void *vec)
int connect()
Connect to stat segment.
counter_t ** simple_counter_vec
The VPP Object Model (VOM) library.
const std::string & name() const
get name of stat
uint8_t ** stat_segment_string_vector(uint8_t **string_vector, const char *string)
const stat_directory_type_t & type() const
get type of stat
counter_t ** m_simple_counter_vec
@ STAT_DIR_TYPE_NAME_VECTOR
uint64_t * get_stat_segment_error_data() const
vlib_counter_t ** get_stat_segment_combined_counter_data() const
@ STAT_DIR_TYPE_COUNTER_VECTOR_SIMPLE
char * stat_segment_index_to_name(uint32_t index)
uint32_t * stat_segment_ls(uint8_t **patterns)
void stat_segment_disconnect(void)
void disconnect()
Disconnect to stat segment.
void stat_segment_data_free(stat_segment_data_t *res)
int stat_segment_connect(const char *socket_name)
int stat_segment_vec_len(void *vec)
Combined counter to hold both packets and byte differences.
int vec_len(void *vec)
Get vector length of VPP style vector.
vlib_counter_t ** m_combined_counter_vec
double get_stat_segment_scalar_data() const
Get pointer to actual data.
sll srl srl sll sra u16x4 i
stat_data_t(const stat_segment_data_t &stat_seg_data)
stat data custom constructor
std::vector< stat_data_t > stat_data_vec_t
vector of stat_data_t
vlib_counter_t ** combined_counter_vec
stat_client()
Stat Client constructor.
uint64_t ** get_stat_segment_simple_counter_data() const
@ STAT_DIR_TYPE_SCALAR_INDEX
A representation of a stat client in VPP.
const stat_data_vec_t & dump()
dump all the stats for given pattern
std::string index_to_name(uint32_t index)
get index to name of stat
double stat_segment_heartbeat(void)
const stat_data_vec_t & dump_entry(uint32_t index)
dump stats for given index in stat directory
~stat_client()
Stat Client destructor.
stat_segment_data_t * stat_segment_dump(uint32_t *stats)
stat_segment_data_t * stat_segment_dump_entry(uint32_t index)
@ STAT_DIR_TYPE_ERROR_INDEX
vl_api_fib_path_type_t type