Tor 0.4.9.0-alpha-dev
metrics_store.h
Go to the documentation of this file.
1/* Copyright (c) 2020-2021, The Tor Project, Inc. */
2/* See LICENSE for licensing information */
3
4/**
5 * @file metrics_store.h
6 * @brief Header for lib/metrics/metrics_store.c
7 **/
8
9#ifndef TOR_LIB_METRICS_METRICS_STORE_H
10#define TOR_LIB_METRICS_METRICS_STORE_H
11
12#include "lib/buf/buffers.h"
14
17
18/* Stub. */
19typedef struct metrics_store_t metrics_store_t;
20
21/* Allocators. */
23#define metrics_store_free(store) \
24 FREE_AND_NULL(metrics_store_t, metrics_store_free_, (store))
26
27/* Modifiers. */
28metrics_store_entry_t *metrics_store_add(metrics_store_t *store,
29 metrics_type_t type, const char *name,
30 const char *help, size_t bucket_count,
31 const int64_t *buckets);
32
34
35/* Accessors. */
37 const char *name);
39 const metrics_store_t *store, buf_t *data);
40
41#ifdef METRICS_METRICS_STORE_PRIVATE
42
43#endif /* METRICS_METRICS_STORE_PRIVATE. */
44
45#endif /* !defined(TOR_LIB_METRICS_METRICS_STORE_H) */
Header file for buffers.c.
const char * name
Definition: config.c:2462
Header for lib/metrics/metrics_common.c.
metrics_type_t
metrics_format_t
void metrics_store_free_(metrics_store_t *store)
Definition: metrics_store.c:85
metrics_store_t * metrics_store_new(void)
Definition: metrics_store.c:74
void metrics_store_get_output(const metrics_format_t fmt, const metrics_store_t *store, buf_t *data)
smartlist_t * metrics_store_get_all(const metrics_store_t *store, const char *name)
Definition: metrics_store.c:98
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)
Header for lib/metrics/metrics_store_entry.c.
Header for smartlist.c.