stats.h
Go to the documentation of this file.
/*
* Copyright (c) 2017 Red Hat, Inc.
*
* All rights reserved.
*
* Authors: Christine Caulfield (ccaulfie@redhat.com)
*
* This software licensed under BSD license, the text of which follows:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* - Neither the name of the MontaVista Software, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
cs_error_t stats_map_init(const struct corosync_api_v1 *api);
cs_error_t stats_map_get(const char *key_name,
void *value,
size_t *value_len,
icmap_value_types_t *type);
cs_error_t stats_map_set(const char *key_name,
const void *value,
size_t value_len,
icmap_value_types_t type);
cs_error_t stats_map_adjust_int(const char *key_name, int32_t step);
cs_error_t stats_map_delete(const char *key_name);
int stats_map_is_key_ro(const char *key_name);
icmap_iter_t stats_map_iter_init(const char *prefix);
const char *stats_map_iter_next(icmap_iter_t iter, size_t *value_len, icmap_value_types_t *type);
void stats_map_iter_finalize(icmap_iter_t iter);
cs_error_t stats_map_track_add(const char *key_name,
int32_t track_type,
icmap_notify_fn_t notify_fn,
void *user_data,
icmap_track_t *icmap_track);
cs_error_t stats_map_track_delete(icmap_track_t icmap_track);
void *stats_map_track_get_user_data(icmap_track_t icmap_track);
void stats_trigger_trackers(void);
void stats_ipcs_add_connection(int service_id, uint32_t pid, void *ptr);
void stats_ipcs_del_connection(int service_id, uint32_t pid, void *ptr);
cs_error_t cs_ipcs_get_conn_stats(int service_id, uint32_t pid, void *conn_ptr, struct ipcs_conn_stats *ipcs_stats);
void stats_add_schedmiss_event(uint64_t, float delay);
cs_error_t
cs_error_t
The cs_error_t enum.
Definition corotypes.h:98
value
uint32_t value
Definition exec/votequorum.c:2
icmap_value_types_t
icmap_value_types_t
Possible types of value.
Definition icmap.h:58
icmap_notify_fn_t
void(* icmap_notify_fn_t)(int32_t event, const char *key_name, struct icmap_notify_value new_value, struct icmap_notify_value old_value, void *user_data)
Prototype for notify callback function.
Definition icmap.h:103
icmap_iter_t
qb_map_iter_t * icmap_iter_t
Itterator type.
Definition icmap.h:123
icmap_track_t
struct icmap_track * icmap_track_t
Track type.
Definition icmap.h:128
user_data
void * user_data
Definition sam.c:127
stats_ipcs_add_connection
void stats_ipcs_add_connection(int service_id, uint32_t pid, void *ptr)
Definition stats.c:765
stats_map_init
cs_error_t stats_map_init(const struct corosync_api_v1 *api)
Definition stats.c:289
stats_map_iter_next
const char * stats_map_iter_next(icmap_iter_t iter, size_t *value_len, icmap_value_types_t *type)
Definition stats.c:541
stats_map_track_get_user_data
void * stats_map_track_get_user_data(icmap_track_t icmap_track)
Definition stats.c:722
stats_trigger_trackers
void stats_trigger_trackers(void)
Definition stats.c:561
stats_map_delete
cs_error_t stats_map_delete(const char *key_name)
Definition stats.c:520
stats_map_track_delete
cs_error_t stats_map_track_delete(icmap_track_t icmap_track)
Definition stats.c:700
stats_map_iter_init
icmap_iter_t stats_map_iter_init(const char *prefix)
Definition stats.c:535
stats_add_schedmiss_event
void stats_add_schedmiss_event(uint64_t, float delay)
Definition stats.c:447
cs_ipcs_get_conn_stats
cs_error_t cs_ipcs_get_conn_stats(int service_id, uint32_t pid, void *conn_ptr, struct ipcs_conn_stats *ipcs_stats)
Definition ipc_glue.c:675
stats_map_is_key_ro
int stats_map_is_key_ro(const char *key_name)
Definition stats.c:525
stats_ipcs_del_connection
void stats_ipcs_del_connection(int service_id, uint32_t pid, void *ptr)
Definition stats.c:775
stats_map_set
cs_error_t stats_map_set(const char *key_name, const void *value, size_t value_len, icmap_value_types_t type)
Definition stats.c:480
stats_map_iter_finalize
void stats_map_iter_finalize(icmap_iter_t iter)
Definition stats.c:555
stats_map_get
cs_error_t stats_map_get(const char *key_name, void *value, size_t *value_len, icmap_value_types_t *type)
Definition stats.c:325
stats_map_adjust_int
cs_error_t stats_map_adjust_int(const char *key_name, int32_t step)
Definition stats.c:515
stats_map_track_add
cs_error_t stats_map_track_add(const char *key_name, int32_t track_type, icmap_notify_fn_t notify_fn, void *user_data, icmap_track_t *icmap_track)
Definition stats.c:637
corosync_api_v1
The corosync_api_v1 struct.
Definition coroapi.h:225
icmap_track
Definition icmap.c:61
ipcs_conn_stats
Definition ipcs_stats.h:53
type
char type
Definition totem.h:2