stats.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Functions

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)

## Function Documentation

## 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 at line 675 of file ipc_glue.c.

References corosync_service.

## stats_add_schedmiss_event()

void stats_add_schedmiss_event | ( | uint64_t | timestamp,
|  | float | delay
| ) |  |

Definition at line 447 of file stats.c.

References ICMAP_KEYNAME_MAXLEN, MAX_SCHEDMISS_EVENTS, and param.

## stats_ipcs_add_connection()

void stats_ipcs_add_connection | ( | int | service_id,
|  | uint32_t | pid,
|  | void * | ptr
| ) |  |

Definition at line 765 of file stats.c.

References cs_ipcs_conn_stats, ICMAP_KEYNAME_MAXLEN, NUM_IPCSC_STATS, and param.

## stats_ipcs_del_connection()

void stats_ipcs_del_connection | ( | int | service_id,
|  | uint32_t | pid,
|  | void * | ptr
| ) |  |

Definition at line 775 of file stats.c.

References cs_ipcs_conn_stats, ICMAP_KEYNAME_MAXLEN, NUM_IPCSC_STATS, and param.

## stats_map_adjust_int()

cs_error_t stats_map_adjust_int | ( | const char * | key_name,
|  | int32_t | step
| ) |  |

Definition at line 515 of file stats.c.

References CS_ERR_NOT_SUPPORTED.

## stats_map_delete()

cs_error_t stats_map_delete | ( | const char * | key_name | ) |

Definition at line 520 of file stats.c.

References CS_ERR_NOT_SUPPORTED.

## 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 at line 325 of file stats.c.

References stats_item::cs_conv, CS_ERR_NOT_EXIST, nodeid, stats_map, and cs_stats_conv::type.

Referenced by stats_map_track_add(), and stats_trigger_trackers().

## stats_map_init()

cs_error_t stats_map_init | ( | const struct corosync_api_v1 * | api | ) |

Definition at line 289 of file stats.c.

## stats_map_is_key_ro()

int stats_map_is_key_ro | ( | const char * | key_name | ) |

Definition at line 525 of file stats.c.

References STATS_CLEAR.

## stats_map_iter_finalize()

void stats_map_iter_finalize | ( | icmap_iter_t | iter | ) |

Definition at line 555 of file stats.c.

## stats_map_iter_init()

icmap_iter_t stats_map_iter_init | ( | const char * | prefix | ) |

Definition at line 535 of file stats.c.

References stats_map.

## stats_map_iter_next()

const char* stats_map_iter_next | ( | icmap_iter_t | iter,
|  | size_t * | value_len,
|  | icmap_value_types_t * | type
| ) |  |

Definition at line 541 of file stats.c.

## 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 at line 480 of file stats.c.

References cs_ipcs_clear_stats(), STATS_CLEAR_IPC, STATS_CLEAR_KNET, STATS_CLEAR_SCHEDMISS, STATS_CLEAR_TOTEM, totempg_stats_clear(), TOTEMPG_STATS_CLEAR_TOTEM, and TOTEMPG_STATS_CLEAR_TRANSPORT.

## 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 at line 637 of file stats.c.

References CS_ERR_NO_MEMORY, CS_ERR_NOT_SUPPORTED, CS_OK, cs_stats_tracker::events, ICMAP_TRACK_ADD, ICMAP_TRACK_DELETE, ICMAP_TRACK_PREFIX, cs_stats_tracker::key_name, cs_stats_tracker::notify_fn, cs_stats_tracker::old_value, stats_map, stats_map_get(), type, cs_stats_tracker::user_data, and user_data.

## stats_map_track_delete()

cs_error_t stats_map_track_delete | ( | icmap_track_t | icmap_track | ) |

Definition at line 700 of file stats.c.

References cs_stats_tracker::events, ICMAP_TRACK_ADD, ICMAP_TRACK_DELETE, cs_stats_tracker::key_name, and stats_map.

## stats_map_track_get_user_data()

void* stats_map_track_get_user_data | ( | icmap_track_t | icmap_track | ) |

Definition at line 722 of file stats.c.

References cs_stats_tracker::user_data.

## stats_trigger_trackers()

void stats_trigger_trackers | ( | void |  | ) |

Definition at line 561 of file stats.c.

References CS_OK, icmap_notify_value::data, cs_stats_tracker::events, ICMAP_TRACK_MODIFY, ICMAP_TRACK_PREFIX, cs_stats_tracker::key_name, icmap_notify_value::len, cs_stats_tracker::notify_fn, cs_stats_tracker::old_value, stats_map_get(), icmap_notify_value::type, type, cs_stats_tracker::user_data, and value.