Tor  0.4.7.0-alpha-dev
Data Structures | Enumerations | Functions
relay_metrics.h File Reference

Header for feature/relay/relay_metrics.c. More...

#include "lib/container/smartlist.h"
#include "lib/metrics/metrics_common.h"

Go to the source code of this file.

Data Structures

struct  relay_metrics_entry_t
 

Enumerations

enum  relay_metrics_key_t {
  RELAY_METRICS_NUM_OOM_BYTES = 0 , RELAY_METRICS_NUM_ONIONSKINS = 1 , RELAY_METRICS_NUM_SOCKETS = 2 , RELAY_METRICS_NUM_GLOBAL_RW_LIMIT = 3 ,
  RELAY_METRICS_NUM_DNS = 4 , RELAY_METRICS_NUM_DNS_ERRORS = 5 , RELAY_METRICS_NUM_TCP_EXHAUSTION = 6
}
 

Functions

void relay_metrics_init (void)
 
void relay_metrics_free (void)
 
const smartlist_trelay_metrics_get_stores (void)
 

Detailed Description

Header for feature/relay/relay_metrics.c.

Definition in file relay_metrics.h.

Enumeration Type Documentation

◆ relay_metrics_key_t

Metrics key for each reported metrics. This key is also used as an index in the base_metrics array.

Enumerator
RELAY_METRICS_NUM_OOM_BYTES 

Number of OOM invocation.

RELAY_METRICS_NUM_ONIONSKINS 

Number of onionskines handled.

RELAY_METRICS_NUM_SOCKETS 

Number of sockets.

RELAY_METRICS_NUM_GLOBAL_RW_LIMIT 

Number of global connection rate limit.

RELAY_METRICS_NUM_DNS 

Number of DNS queries.

RELAY_METRICS_NUM_DNS_ERRORS 

Number of DNS query errors.

RELAY_METRICS_NUM_TCP_EXHAUSTION 

Number of TCP exhaustion reached.

Definition at line 17 of file relay_metrics.h.

Function Documentation

◆ relay_metrics_free()

void relay_metrics_free ( void  )

Free the relay metrics.

Definition at line 371 of file relay_metrics.c.

◆ relay_metrics_get_stores()

const smartlist_t* relay_metrics_get_stores ( void  )

Return a list of all the relay metrics stores. This is the function attached to the .get_metrics() member of the subsys_t.

Definition at line 338 of file relay_metrics.c.

◆ relay_metrics_init()

void relay_metrics_init ( void  )

Initialize the relay metrics.

Definition at line 361 of file relay_metrics.c.