Tor 0.4.9.8
Loading...
Searching...
No Matches
metrics_store.h File Reference

Header for lib/metrics/metrics_store.c. More...

Go to the source code of this file.

Macros

#define metrics_store_free(store)
 

Functions

void metrics_store_free_ (metrics_store_t *store)
 
metrics_store_tmetrics_store_new (void)
 
metrics_store_entry_t * metrics_store_add (metrics_store_t *store, metrics_type_t type, const char *name, const char *help, size_t bucket_count, const int64_t *buckets)
 
void metrics_store_reset (metrics_store_t *store)
 
smartlist_tmetrics_store_get_all (const metrics_store_t *store, const char *name)
 
void metrics_store_get_output (const metrics_format_t fmt, const metrics_store_t *store, buf_t *data)
 

Detailed Description

Header for lib/metrics/metrics_store.c.

Definition in file metrics_store.h.

Macro Definition Documentation

◆ metrics_store_free

#define metrics_store_free ( store)
Value:
FREE_AND_NULL(metrics_store_t, metrics_store_free_, (store))
void metrics_store_free_(metrics_store_t *store)

Definition at line 23 of file metrics_store.h.

Function Documentation

◆ metrics_store_add()

metrics_store_entry_t * metrics_store_add ( metrics_store_t * store,
metrics_type_t type,
const char * name,
const char * help,
size_t bucket_count,
const int64_t * buckets )

◆ metrics_store_free_()

void metrics_store_free_ ( metrics_store_t * store)

Free the given store including all its entries.

Definition at line 85 of file metrics_store.c.

◆ metrics_store_get_all()

smartlist_t * metrics_store_get_all ( const metrics_store_t * store,
const char * name )

Find all metrics entry in the given store identified by name. If not found, NULL is returned.

Definition at line 98 of file metrics_store.c.

Referenced by hs_metrics_update_by_service(), and metrics_store_add().

◆ metrics_store_get_output()

void metrics_store_get_output ( const metrics_format_t fmt,
const metrics_store_t * store,
buf_t * data )

Set the output of the given store of the format fmt into the given buffer data.

Definition at line 134 of file metrics_store.c.

Referenced by metrics_get_output().

◆ metrics_store_new()

metrics_store_t * metrics_store_new ( void )

Return a newly allocated and initialized store of the given type.

Definition at line 74 of file metrics_store.c.

Referenced by hs_metrics_service_init(), and relay_metrics_init().

◆ metrics_store_reset()

void metrics_store_reset ( metrics_store_t * store)

Reset a store as in free its content.

Definition at line 152 of file metrics_store.c.

Referenced by fill_store().