23 const uint16_t at_port, time_t when);
46 time_t end_of_interval);
50 double mean_time_cells_in_queue, uint32_t processed_cells);
74 char *rep_hist_get_hs_v3_stats_string(
void);
92 extern int onion_handshakes_assigned[MAX_ONION_HANDSHAKE_TYPE+1];
93 extern uint64_t onion_handshakes_dropped[MAX_ONION_HANDSHAKE_TYPE+1];
96 #ifdef REPHIST_PRIVATE
99 typedef struct hs_v2_stats_t {
101 uint64_t rp_v2_relay_cells_seen;
112 typedef struct hs_v3_stats_t {
114 uint64_t rp_v3_relay_cells_seen;
118 digest256map_t *v3_onions_seen_this_period;
143 #define REPHIST_CELL_PADDING_COUNTS_INTERVAL (24*60*60)
148 void rep_hist_prep_published_padding_counts(time_t now);
163 OVERLOAD_FD_EXHAUSTED,
176 #ifdef TOR_UNIT_TESTS
177 struct hs_v2_stats_t;
178 const struct hs_v2_stats_t *rep_hist_get_hs_v2_stats(
void);
179 struct hs_v3_stats_t;
180 const struct hs_v3_stats_t *rep_hist_get_hs_v3_stats(
void);
STATIC int onion_handshakes_requested[MAX_ONION_HANDSHAKE_TYPE+1]
STATIC char * rep_hist_format_hs_stats(time_t now, bool is_v3)
STATIC bool should_collect_v3_stats(void)
void rep_hist_note_dns_error(int type, uint8_t error)
void rep_hist_note_desc_served(const char *desc)
void rep_hist_buffer_stats_term(void)
time_t rep_hist_downrate_old_runs(time_t now)
void rep_hist_note_exit_bytes(uint16_t port, size_t num_written, size_t num_read)
void rep_hist_note_negotiated_link_proto(unsigned link_proto, int started_here)
@ PADDING_TYPE_ENABLED_CELL
@ PADDING_TYPE_ENABLED_TOTAL
void rep_hist_note_router_reachable(const char *id, const tor_addr_t *at_addr, const uint16_t at_port, time_t when)
uint64_t rephist_total_alloc
void rep_hist_seen_new_rp_cell(bool is_v2)
void rep_hist_desc_stats_term(void)
uint64_t rep_hist_get_n_dns_request(int type)
void rep_hist_hs_stats_term(void)
uint64_t rep_hist_get_circuit_handshake_dropped(uint16_t type)
void rep_hist_reset_padding_counts(void)
double rep_hist_get_stability(const char *id, time_t when)
int rep_hist_load_mtbf_data(time_t now)
void rep_hist_note_circuit_handshake_dropped(uint16_t type)
void rep_hist_free_all(void)
int rep_hist_get_circuit_handshake_assigned(uint16_t type)
time_t rep_hist_desc_stats_write(time_t now)
char * rep_hist_get_overload_stats_lines(void)
void rep_hist_buffer_stats_init(time_t now)
void rep_hist_exit_stats_init(time_t now)
void rep_hist_note_exit_stream_opened(uint16_t port)
double rep_hist_get_weighted_fractional_uptime(const char *id, time_t when)
void rep_hist_buffer_stats_add_circ(circuit_t *circ, time_t end_of_interval)
void rep_hist_note_dns_request(int type)
void rep_hist_padding_count_write(padding_type_t type)
char * rep_hist_get_overload_general_line(void)
long rep_hist_get_uptime(const char *id, time_t when)
long rep_hist_get_weighted_time_known(const char *id, time_t when)
void rep_hist_dump_stats(time_t now, int severity)
void rep_hist_reset_buffer_stats(time_t now)
void rep_hist_note_router_unreachable(const char *id, time_t when)
void rep_hist_hs_stats_init(time_t now)
void rep_hist_hsdir_stored_maybe_new_v3_onion(const uint8_t *blinded_key)
char * rep_hist_format_exit_stats(time_t now)
void rep_hist_log_link_protocol_counts(void)
uint32_t rephist_total_num
char * rep_hist_get_padding_count_lines(void)
void rep_hist_add_buffer_stats(double mean_num_cells_in_queue, double mean_time_cells_in_queue, uint32_t processed_cells)
void rep_hist_note_circuit_handshake_requested(uint16_t type)
int rep_hist_get_circuit_handshake_requested(uint16_t type)
void rep_history_clean(time_t before)
void rep_hist_desc_stats_init(time_t now)
uint64_t rep_hist_get_n_dns_error(int type, uint8_t error)
uint64_t rep_hist_get_n_read_limit_reached(void)
uint64_t rep_hist_get_n_tcp_exhaustion(void)
int rep_hist_record_mtbf_data(time_t now, int missing_means_down)
char * rep_hist_format_buffer_stats(time_t now)
void rep_hist_reset_exit_stats(time_t now)
void rep_hist_padding_count_timers(uint64_t num_timers)
time_t rep_hist_hs_stats_write(time_t now, bool is_v3)
time_t rep_hist_buffer_stats_write(time_t now)
void rep_hist_make_router_pessimal(const char *id, time_t when)
void rep_hist_exit_stats_term(void)
void rep_hist_note_overload(overload_type_t overload)
void rep_hist_log_circuit_handshake_stats(time_t now)
void rep_hist_note_circuit_handshake_assigned(uint16_t type)
void rep_hist_note_tcp_exhaustion(void)
void rep_hist_padding_count_read(padding_type_t type)
int rep_hist_have_measured_enough_stability(void)
uint64_t rep_hist_get_n_write_limit_reached(void)
time_t rep_hist_exit_stats_write(time_t now)
#define MOCK_DECL(rv, funcname, arglist)