|
Tor 0.4.9.8
|
Basic history and performance-tracking functionality. More...
#include "core/or/or.h"#include "app/config/config.h"#include "core/mainloop/connection.h"#include "core/or/circuitlist.h"#include "core/or/connection_or.h"#include "feature/dirauth/authmode.h"#include "feature/nodelist/networkstatus.h"#include "feature/nodelist/nodelist.h"#include "feature/stats/predict_ports.h"#include "feature/stats/connstats.h"#include "feature/stats/rephist.h"#include "lib/container/order.h"#include "lib/crypt_ops/crypto_rand.h"#include "lib/math/laplace.h"#include "feature/nodelist/networkstatus_st.h"#include "core/or/or_circuit_st.h"#include <event2/dns.h>Go to the source code of this file.
Data Structures | |
| struct | or_history_t |
| struct | padding_counts_t |
| struct | overload_stats_t |
| struct | overload_dns_stats_t |
| struct | dns_stats_t |
| struct | circ_buffer_stats_t |
| struct | overload_onionskin_assessment_t |
Functions | |
| static dns_stats_t * | get_dns_stats_by_type (const int type) |
| uint64_t | rep_hist_get_n_dns_error (int type, uint8_t error) |
| uint64_t | rep_hist_get_n_dns_request (int type) |
| void | rep_hist_note_dns_error (int type, uint8_t error) |
| void | rep_hist_note_dns_request (int type) |
| static bool | overload_happened_recently (time_t overload_time, int n_hours) |
| uint64_t | rep_hist_get_n_read_limit_reached (void) |
| uint64_t | rep_hist_get_n_write_limit_reached (void) |
| char * | rep_hist_get_overload_general_line (void) |
| char * | rep_hist_get_overload_stats_lines (void) |
| void | rep_hist_note_overload (overload_type_t overload) |
| void | rep_hist_note_tcp_exhaustion (void) |
| uint64_t | rep_hist_get_n_tcp_exhaustion (void) |
| static or_history_t * | get_or_history (const char *id) |
| static void | free_or_history (void *_hist) |
| void | rep_hist_init (void) |
| void | rep_hist_note_router_reachable (const char *id, const tor_addr_t *at_addr, const uint16_t at_port, time_t when) |
| void | rep_hist_note_router_unreachable (const char *id, time_t when) |
| void | rep_hist_make_router_pessimal (const char *id, time_t when) |
| time_t | rep_hist_downrate_old_runs (time_t now) |
| static double | get_stability (or_history_t *hist, time_t when) |
| static long | get_total_weighted_time (or_history_t *hist, time_t when) |
| static double | get_weighted_fractional_uptime (or_history_t *hist, time_t when) |
| long | rep_hist_get_uptime (const char *id, time_t when) |
| double | rep_hist_get_stability (const char *id, time_t when) |
| double | rep_hist_get_weighted_fractional_uptime (const char *id, time_t when) |
| long | rep_hist_get_weighted_time_known (const char *id, time_t when) |
| int | rep_hist_have_measured_enough_stability (void) |
| void | rep_hist_dump_stats (time_t now, int severity) |
| void | rep_history_clean (time_t before) |
| int | rep_hist_record_mtbf_data (time_t now, int missing_means_down) |
| static int | find_next_with (smartlist_t *sl, int i, const char *prefix) |
| static int | parse_possibly_bad_iso_time (const char *s, time_t *time_out) |
| static time_t | correct_time (time_t t, time_t now, time_t stored_at, time_t started_measuring) |
| int | rep_hist_load_mtbf_data (time_t now) |
| void | rep_hist_exit_stats_init (time_t now) |
| void | rep_hist_reset_exit_stats (time_t now) |
| void | rep_hist_exit_stats_term (void) |
| static int | compare_int_ (const void *x, const void *y) |
| char * | rep_hist_format_exit_stats (time_t now) |
| time_t | rep_hist_exit_stats_write (time_t now) |
| void | rep_hist_note_exit_bytes (uint16_t port, size_t num_written, size_t num_read) |
| void | rep_hist_note_exit_stream_opened (uint16_t port) |
| void | rep_hist_note_exit_stream (unsigned int cmd) |
| uint64_t | rep_hist_get_exit_stream_seen (unsigned int cmd) |
| void | rep_hist_note_conn_opened (bool from_listener, unsigned int type, int af) |
| void | rep_hist_note_conn_closed (bool from_listener, unsigned int type, int af) |
| void | rep_hist_note_conn_rejected (unsigned int type, int af) |
| uint64_t | rep_hist_get_conn_created (bool from_listener, unsigned int type, int af) |
| uint64_t | rep_hist_get_conn_opened (bool from_listener, unsigned int type, int af) |
| uint64_t | rep_hist_get_conn_rejected (unsigned int type, int af) |
| void | rep_hist_buffer_stats_init (time_t now) |
| 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_buffer_stats_add_circ (circuit_t *circ, time_t end_of_interval) |
| static int | buffer_stats_compare_entries_ (const void **_a, const void **_b) |
| void | rep_hist_buffer_stats_term (void) |
| void | rep_hist_reset_buffer_stats (time_t now) |
| char * | rep_hist_format_buffer_stats (time_t now) |
| time_t | rep_hist_buffer_stats_write (time_t now) |
| void | rep_hist_desc_stats_init (time_t now) |
| static void | rep_hist_reset_desc_stats (time_t now) |
| void | rep_hist_desc_stats_term (void) |
| static char * | rep_hist_format_desc_stats (time_t now) |
| time_t | rep_hist_desc_stats_write (time_t now) |
| void | rep_hist_note_desc_served (const char *desc) |
| static uint16_t | onionskin_type_to_stat (uint16_t type) |
| static void | overload_general_onionskin_assessment (void) |
| void | rep_hist_note_circuit_handshake_requested (uint16_t type) |
| void | rep_hist_note_circuit_handshake_assigned (uint16_t type) |
| void | rep_hist_note_circuit_handshake_dropped (uint16_t type) |
| int | rep_hist_get_circuit_handshake_requested (uint16_t type) |
| int | rep_hist_get_circuit_handshake_assigned (uint16_t type) |
| uint64_t | rep_hist_get_circuit_n_handshake_assigned (uint16_t type) |
| uint64_t | rep_hist_get_circuit_n_handshake_dropped (uint16_t type) |
| void | rep_hist_log_circuit_handshake_stats (time_t now) |
| static hs_v2_stats_t * | hs_v2_stats_new (void) |
| static void | hs_v2_stats_free_ (hs_v2_stats_t *victim_hs_v2_stats) |
| static void | rep_hist_reset_hs_v2_stats (time_t now) |
| static hs_v3_stats_t * | hs_v3_stats_new (void) |
| static void | hs_v3_stats_free_ (hs_v3_stats_t *victim_hs_v3_stats) |
| static void | rep_hist_reset_hs_v3_stats (time_t now) |
| STATIC bool | should_collect_v3_stats (void) |
| void | rep_hist_hsdir_stored_maybe_new_v3_onion (const uint8_t *blinded_key) |
| void | rep_hist_seen_new_rp_cell (bool is_v2) |
| void | rep_hist_hs_stats_init (time_t now) |
| void | rep_hist_hs_stats_term (void) |
| STATIC char * | rep_hist_format_hs_stats (time_t now, bool is_v3) |
| time_t | rep_hist_hs_stats_write (time_t now, bool is_v3) |
| void | rep_hist_note_negotiated_link_proto (unsigned link_proto, int started_here) |
| void | rep_hist_padding_count_timers (uint64_t num_timers) |
| void | rep_hist_padding_count_write (padding_type_t type) |
| void | rep_hist_padding_count_read (padding_type_t type) |
| void | rep_hist_reset_padding_counts (void) |
| void | rep_hist_prep_published_padding_counts (time_t now) |
| char * | rep_hist_get_padding_count_lines (void) |
| void | rep_hist_log_link_protocol_counts (void) |
| void | rep_hist_free_all (void) |
| void | rep_hist_consensus_has_changed (const networkstatus_t *ns) |
| uint64_t | rep_hist_get_drop_cell_received_count (void) |
Basic history and performance-tracking functionality.
Basic history and performance-tracking functionality to remember which servers have worked in the past, how much bandwidth we've been using, which ports we tend to want, and so on; further, exit port statistics, cell statistics, and connection statistics.
The history and information tracked in this module could sensibly be divided into several categories:
Statistics used by authorities to remember the uptime and stability information about various relays, including "uptime", "weighted fractional uptime" and "mean time between failures".
Predicted ports, used by clients to remember how long it's been since they opened an exit connection to each given target port. Clients use this information in order to try to keep circuits open to exit nodes that can connect to the ports that they care about. (The predicted ports mechanism also handles predicted circuit usage that isn't port-specific, such as resolves, internal circuits, and so on.)
Public key operation counters, for tracking how many times we've done each public key operation. (This is unmaintained and we should remove it.)
Exit statistics by port, used by exits to keep track of the number of streams and bytes they've served at each exit port, so they can generate their exit-kibibytes-{read,written} and exit-streams-opened statistics.
Circuit stats, used by relays instances to tract circuit queue fullness and delay over time, and generate cell-processed-cells, cell-queued-cells, cell-time-in-queue, and cell-circuits-per-decile statistics.
Descriptor serving statistics, used by directory caches to track how many descriptors they've served.
Onion handshake statistics, used by relays to count how many TAP and ntor handshakes they've handled.
Hidden service statistics, used by relays to count rendezvous traffic and HSDir-stored descriptors.
Link protocol statistics, used by relays to count how many times each link protocol has been used.
The entry points for this module are scattered throughout the codebase. Sending data, receiving data, connecting to a relay, losing a connection to a relay, and so on can all trigger a change in our current stats. Relays also invoke this module in order to extract their statistics when building routerinfo and extrainfo objects in router.c.
TODO: This module should be broken up.
(The "rephist" name originally stood for "reputation and history". )
Definition in file rephist.c.
| #define CONN_DIRECTION | ( | from_listener | ) |
| #define EXIT_STATS_NUM_PORTS 65536 |
Number of TCP ports
Definition at line 1376 of file rephist.c.
Referenced by rep_hist_exit_stats_init(), rep_hist_format_exit_stats(), and rep_hist_reset_exit_stats().
| #define EXIT_STATS_ROUND_UP_BYTES 1024 |
To what multiple should byte numbers be rounded up?
Definition at line 1372 of file rephist.c.
Referenced by rep_hist_format_exit_stats().
| #define EXIT_STATS_ROUND_UP_STREAMS 4 |
To what multiple should stream counts be rounded up?
Definition at line 1374 of file rephist.c.
Referenced by rep_hist_format_exit_stats().
| #define EXIT_STATS_TOP_N_PORTS 10 |
Top n ports that will be included in exit stats.
Definition at line 1378 of file rephist.c.
Referenced by rep_hist_format_exit_stats().
| #define hs_v2_stats_free | ( | val | ) |
| #define hs_v3_stats_free | ( | val | ) |
| #define MIN_CELL_COUNTS_TO_PUBLISH 1 |
| #define OVERLOAD_ONIONSKIN_NTOR_PERIOD_SECS_DEFAULT (60 * 60 * 6) |
| #define OVERLOAD_ONIONSKIN_NTOR_PERIOD_SECS_MAX INT32_MAX |
| #define PRINTF | ( | args | ) |
| #define PUT | ( | s | ) |
| #define REND_CELLS_DELTA_F 2048 |
Stats reporting code
Definition at line 2667 of file rephist.c.
Referenced by rep_hist_format_hs_stats().
| #define ROUND_AND_SET_COUNT | ( | x | ) |
| #define SET_TO_START_OF_HOUR | ( | a | ) |
Round down the time in a to the beginning of the current hour
Definition at line 535 of file rephist.c.
Referenced by rep_hist_note_overload().
| #define STABILITY_ALPHA 0.95 |
Value by which to discount all old intervals for MTBF purposes. This is compounded every STABILITY_INTERVAL.
Definition at line 104 of file rephist.c.
Referenced by rep_hist_downrate_old_runs().
| #define STABILITY_EPSILON 0.0001 |
If the total weighted run count of all runs for a router ever falls below this amount, the router can be treated as having 0 MTBF.
Definition at line 101 of file rephist.c.
Referenced by get_stability(), and rep_history_clean().
| #define STABILITY_INTERVAL (12*60*60) |
Interval at which to discount all old intervals for MTBF purposes.
Definition at line 106 of file rephist.c.
Referenced by rep_hist_downrate_old_runs().
| #define SUBTRACT_CLAMPED | ( | var, | |
| penalty ) |
|
static |
Sorting helper: return -1, 1, or 0 based on comparison of two circ_buffer_stats_t
Definition at line 1908 of file rephist.c.
Referenced by rep_hist_format_buffer_stats().
|
static |
Helper for qsort: compare two ints. Does not handle overflow properly, but works fine for sorting an array of port numbers, which is what we use it for.
Definition at line 1429 of file rephist.c.
Referenced by rep_hist_format_exit_stats().
|
inlinestatic |
We've read a time t from a file stored at stored_at, which says we started measuring at started_measuring. Return a new number that's about as much before now as t was before stored_at.
Definition at line 1161 of file rephist.c.
Referenced by rep_hist_load_mtbf_data().
|
static |
Helper: return the first j >= i such that !strcmpstart(sl[j], prefix) and such that no line sl[k] with i <= k < j starts with "R ". Return -1 if no such line exists.
Definition at line 1123 of file rephist.c.
Referenced by rep_hist_load_mtbf_data().
|
static |
Helper: free storage held by a single OR history entry.
Definition at line 615 of file rephist.c.
Referenced by rep_hist_free_all(), and rep_history_clean().
|
inlinestatic |
Return the point to the DNS statistics store. Ignore the type for now because of a libevent problem.
Definition at line 289 of file rephist.c.
Referenced by rep_hist_get_n_dns_error(), rep_hist_get_n_dns_request(), rep_hist_note_dns_error(), and rep_hist_note_dns_request().
|
static |
Return the or_history_t for the OR with identity digest id, creating it if necessary.
Definition at line 594 of file rephist.c.
Referenced by rep_hist_get_stability(), rep_hist_get_uptime(), rep_hist_get_weighted_fractional_uptime(), rep_hist_get_weighted_time_known(), rep_hist_load_mtbf_data(), rep_hist_make_router_pessimal(), rep_hist_note_router_reachable(), and rep_hist_note_router_unreachable().
|
static |
Helper: Return the weighted MTBF of the router with history hist.
Definition at line 819 of file rephist.c.
Referenced by rep_hist_dump_stats(), and rep_hist_get_stability().
|
static |
Return the total amount of time we've been observing, with each run of time downrated by the appropriate factor.
Definition at line 841 of file rephist.c.
Referenced by rep_hist_get_weighted_time_known().
|
static |
Helper: Return the weighted percent-of-time-online of the router with history hist.
Definition at line 855 of file rephist.c.
Referenced by rep_hist_get_weighted_fractional_uptime().
|
static |
|
static |
HSv2 stats Allocate, initialize and return an hs_v2_stats_t structure.
Definition at line 2465 of file rephist.c.
Referenced by rep_hist_hs_stats_init(), and rep_hist_reset_hs_v2_stats().
|
static |
|
static |
Allocate, initialize and return an hs_v3_stats_t structure.
Definition at line 2537 of file rephist.c.
Referenced by rep_hist_hs_stats_init(), and rep_hist_reset_hs_v3_stats().
|
inlinestatic |
This function ensures that we clamp the maximum value of the given input type to NTOR in case the input is out of range.
Definition at line 2300 of file rephist.c.
Referenced by rep_hist_get_circuit_handshake_assigned(), rep_hist_get_circuit_handshake_requested(), rep_hist_get_circuit_n_handshake_assigned(), rep_hist_get_circuit_n_handshake_dropped(), rep_hist_note_circuit_handshake_assigned(), rep_hist_note_circuit_handshake_dropped(), and rep_hist_note_circuit_handshake_requested().
|
static |
Assess our ntor handshake statistics and decide if we need to emit a general overload signal.
Regardless of overloaded or not, if the assessment time period has passed, the stats are reset back to 0 and the assessment time period updated.
This is called when a ntor handshake is requested because we want to avoid to have an asymmetric situation where requested counter is reset to 0 but then a drop happens leading to the drop counter being incremented while the requested counter is 0.
Definition at line 2320 of file rephist.c.
Referenced by rep_hist_note_circuit_handshake_requested().
|
static |
Return true if this overload happened within the last n_hours.
Definition at line 447 of file rephist.c.
Referenced by rep_hist_get_overload_general_line(), and rep_hist_get_overload_stats_lines().
|
static |
Parse the ISO-formatted time in s into *time_out, but round any pre-1970 date to Jan 1, 1970.
Definition at line 1140 of file rephist.c.
Referenced by rep_hist_load_mtbf_data().
| void rep_hist_add_buffer_stats | ( | double | mean_num_cells_in_queue, |
| double | mean_time_cells_in_queue, | ||
| uint32_t | processed_cells ) |
Remember cell statistics mean_num_cells_in_queue, mean_time_cells_in_queue, and processed_cells of a circuit.
Definition at line 1853 of file rephist.c.
Referenced by rep_hist_buffer_stats_add_circ().
| void rep_hist_buffer_stats_add_circ | ( | circuit_t * | circ, |
| time_t | end_of_interval ) |
Remember cell statistics for circuit circ at time end_of_interval and reset cell counters in case the circuit remains open in the next measurement interval.
Definition at line 1872 of file rephist.c.
Referenced by circuit_free_(), and rep_hist_buffer_stats_write().
| void rep_hist_buffer_stats_init | ( | time_t | now | ) |
Initialize buffer stats.
Definition at line 1830 of file rephist.c.
Referenced by options_act_relay_stats().
| void rep_hist_buffer_stats_term | ( | void | ) |
Stop collecting cell stats in a way that we can re-start doing so in rep_hist_buffer_stats_init().
Definition at line 1922 of file rephist.c.
Referenced by options_act_relay_stats().
| time_t rep_hist_buffer_stats_write | ( | time_t | now | ) |
If 24 hours have passed since the beginning of the current buffer stats period, write buffer stats to $DATADIR/stats/buffer-stats (possibly overwriting an existing file) and reset counters. Return when we would next want to write buffer stats or 0 if we never want to write.
Definition at line 2047 of file rephist.c.
Referenced by write_stats_file_callback().
| void rep_hist_consensus_has_changed | ( | const networkstatus_t * | ns | ) |
| void rep_hist_desc_stats_init | ( | time_t | now | ) |
Initialize descriptor stats.
Definition at line 2094 of file rephist.c.
Referenced by options_act_dirauth_stats(), and rep_hist_reset_desc_stats().
| void rep_hist_desc_stats_term | ( | void | ) |
Stop collecting served descs stats, so that rep_hist_desc_stats_init() is safe to be called again.
Definition at line 2117 of file rephist.c.
Referenced by options_act_dirauth_stats(), rep_hist_free_all(), and rep_hist_reset_desc_stats().
| time_t rep_hist_desc_stats_write | ( | time_t | now | ) |
If WRITE_STATS_INTERVAL seconds have passed since the beginning of the current served desc stats interval, write the stats to $DATADIR/stats/served-desc-stats (possibly appending to an existing file) and reset the state for the next interval. Return when we would next want to write served desc stats or 0 if we won't want to write.
Definition at line 2184 of file rephist.c.
Referenced by write_stats_file_callback().
| time_t rep_hist_downrate_old_runs | ( | time_t | now | ) |
Helper: Discount all old MTBF data, if it is time to do so. Return the time at which we should next discount MTBF data.
Definition at line 774 of file rephist.c.
Referenced by downrate_stability_callback().
| void rep_hist_dump_stats | ( | time_t | now, |
| int | severity ) |
Log all the reliability data we have remembered, with the chosen severity.
Definition at line 946 of file rephist.c.
Referenced by dumpstats().
| void rep_hist_exit_stats_init | ( | time_t | now | ) |
Initialize exit port stats.
Definition at line 1396 of file rephist.c.
Referenced by options_act_relay_stats().
| void rep_hist_exit_stats_term | ( | void | ) |
Stop collecting exit port stats in a way that we can re-start doing so in rep_hist_exit_stats_init().
Definition at line 1417 of file rephist.c.
Referenced by options_act_relay_stats().
| time_t rep_hist_exit_stats_write | ( | time_t | now | ) |
If 24 hours have passed since the beginning of the current exit port stats period, write exit stats to $DATADIR/stats/exit-stats (possibly overwriting an existing file) and reset counters. Return when we would next want to write exit stats or 0 if we never want to write.
Definition at line 1593 of file rephist.c.
Referenced by write_stats_file_callback().
| char * rep_hist_format_buffer_stats | ( | time_t | now | ) |
Return a newly allocated string containing the buffer statistics until now, or NULL if we're not collecting buffer stats. Caller must ensure start_of_buffer_stats_interval is in the past.
Definition at line 1944 of file rephist.c.
Referenced by rep_hist_buffer_stats_write().
|
static |
Helper for rep_hist_desc_stats_write(). Return a newly allocated string containing the served desc statistics until now, or NULL if we're not collecting served desc stats. Caller must ensure that now is not before start_of_served_descs_stats_interval.
Definition at line 2130 of file rephist.c.
Referenced by rep_hist_desc_stats_write().
| char * rep_hist_format_exit_stats | ( | time_t | now | ) |
Return a newly allocated string containing the exit port statistics until now, or NULL if we're not collecting exit stats. Caller must ensure start_of_exit_stats_interval is in the past.
Definition at line 1438 of file rephist.c.
Referenced by rep_hist_exit_stats_write().
| STATIC char * rep_hist_format_hs_stats | ( | time_t | now, |
| bool | is_v3 ) |
Allocate and return a string containing hidden service stats that are meant to be placed in the extra-info descriptor.
Function works for both v2 and v3 stats depending on is_v3.
Definition at line 2692 of file rephist.c.
Referenced by rep_hist_hs_stats_write().
| void rep_hist_free_all | ( | void | ) |
Free all storage held by the OR/link history caches, by the bandwidth history arrays, by the port history, or by statistics .
Definition at line 2986 of file rephist.c.
Referenced by tor_free_all().
| int rep_hist_get_circuit_handshake_assigned | ( | uint16_t | type | ) |
Get the circuit handshake value that is assigned.
Definition at line 2416 of file rephist.c.
Referenced by getinfo_helper_rephist().
| int rep_hist_get_circuit_handshake_requested | ( | uint16_t | type | ) |
Get the circuit handshake value that is requested.
Definition at line 2409 of file rephist.c.
Referenced by getinfo_helper_rephist().
| uint64_t rep_hist_get_circuit_n_handshake_assigned | ( | uint16_t | type | ) |
Get the total number of circuit handshake value that is assigned.
Definition at line 2423 of file rephist.c.
Referenced by fill_onionskins_values().
| uint64_t rep_hist_get_circuit_n_handshake_dropped | ( | uint16_t | type | ) |
Get the total number of circuit handshake value that is dropped.
Definition at line 2430 of file rephist.c.
Referenced by fill_onionskins_values().
| uint64_t rep_hist_get_conn_created | ( | bool | from_listener, |
| unsigned int | type, | ||
| int | af ) |
Return number of created connections of the given type.
Definition at line 1777 of file rephist.c.
Referenced by fill_conn_counter_values().
| uint64_t rep_hist_get_conn_opened | ( | bool | from_listener, |
| unsigned int | type, | ||
| int | af ) |
Return number of opened connections of the given type.
Definition at line 1793 of file rephist.c.
Referenced by fill_conn_gauge_values().
| uint64_t rep_hist_get_conn_rejected | ( | unsigned int | type, |
| int | af ) |
Return number of opened connections of the given type.
Definition at line 1809 of file rephist.c.
Referenced by fill_conn_counter_values().
| uint64_t rep_hist_get_drop_cell_received_count | ( | void | ) |
Relay Only: return the total number of DROP cell received.
Definition at line 3032 of file rephist.c.
Referenced by fill_relay_drop_cell().
| uint64_t rep_hist_get_exit_stream_seen | ( | unsigned int | cmd | ) |
Return number of stream seen for the given command.
Definition at line 1676 of file rephist.c.
Referenced by fill_single_stream_value().
| uint64_t rep_hist_get_n_dns_error | ( | int | type, |
| uint8_t | error ) |
Return the DNS error count for the given libevent DNS type and error code. The possible types are: DNS_IPv4_A, DNS_PTR, DNS_IPv6_AAAA.
Definition at line 317 of file rephist.c.
Referenced by fill_dns_error_values().
| uint64_t rep_hist_get_n_dns_request | ( | int | type | ) |
Return the total number of DNS request seen for the given libevent DNS record type. Possible types are: DNS_IPv4_A, DNS_PTR, DNS_IPv6_AAAA.
Definition at line 358 of file rephist.c.
Referenced by fill_dns_query_values().
| uint64_t rep_hist_get_n_read_limit_reached | ( | void | ) |
Return the stats_n_read_limit_reached counter.
Definition at line 461 of file rephist.c.
Referenced by fill_global_bw_limit_values().
| uint64_t rep_hist_get_n_tcp_exhaustion | ( | void | ) |
Return the total number of TCP exhaustion times we've reached.
Definition at line 586 of file rephist.c.
Referenced by fill_tcp_exhaustion_values().
| uint64_t rep_hist_get_n_write_limit_reached | ( | void | ) |
Return the stats_n_write_limit_reached counter.
Definition at line 468 of file rephist.c.
Referenced by fill_global_bw_limit_values().
| char * rep_hist_get_overload_general_line | ( | void | ) |
Returns an allocated string for server descriptor for publising information on whether we are overloaded or not.
Definition at line 476 of file rephist.c.
Referenced by router_dump_router_to_string().
| char * rep_hist_get_overload_stats_lines | ( | void | ) |
Returns an allocated string for extra-info documents for publishing overload statistics.
Definition at line 494 of file rephist.c.
Referenced by extrainfo_dump_to_string_stats_helper().
| char * rep_hist_get_padding_count_lines | ( | void | ) |
Returns an allocated string for extra-info documents for publishing padding statistics from the last 24 hour interval.
Definition at line 2916 of file rephist.c.
Referenced by extrainfo_dump_to_string_stats_helper().
| double rep_hist_get_stability | ( | const char * | id, |
| time_t | when ) |
Return an estimated MTBF for the router whose identity digest is id. Return 0 if the router is unknown.
Definition at line 895 of file rephist.c.
Referenced by dirserv_compute_performance_thresholds(), dirserv_thinks_router_is_unreliable(), and routerstatus_format_entry().
| long rep_hist_get_uptime | ( | const char * | id, |
| time_t | when ) |
Return how long the router whose identity digest is id has been reachable. Return 0 if the router is unknown or currently deemed unreachable.
Definition at line 882 of file rephist.c.
Referenced by dirserv_thinks_router_is_hs_dir().
| double rep_hist_get_weighted_fractional_uptime | ( | const char * | id, |
| time_t | when ) |
Return an estimated percent-of-time-online for the router whose identity digest is id. Return 0 if the router is unknown.
Definition at line 907 of file rephist.c.
Referenced by dirauth_set_routerstatus_from_routerinfo(), dirserv_compute_performance_thresholds(), and routerstatus_format_entry().
| long rep_hist_get_weighted_time_known | ( | const char * | id, |
| time_t | when ) |
Return a number representing how long we've known about the router whose digest is id. Return 0 if the router is unknown.
Be careful: this measure increases monotonically as we know the router for longer and longer, but it doesn't increase linearly.
Definition at line 923 of file rephist.c.
Referenced by dirauth_set_routerstatus_from_routerinfo(), dirserv_compute_performance_thresholds(), and routerstatus_format_entry().
| int rep_hist_have_measured_enough_stability | ( | void | ) |
Return true if we've been measuring MTBFs for long enough to pronounce on Stability.
Definition at line 935 of file rephist.c.
Referenced by dirserv_compute_performance_thresholds().
| void rep_hist_hs_stats_init | ( | time_t | now | ) |
Generic HS stats code Initialize v2 and v3 hidden service statistics.
Definition at line 2636 of file rephist.c.
Referenced by options_act_relay_stats().
| void rep_hist_hs_stats_term | ( | void | ) |
Stop collecting hidden service stats in a way that we can re-start doing so in rep_hist_buffer_stats_init().
Definition at line 2656 of file rephist.c.
Referenced by options_act_relay_stats().
| time_t rep_hist_hs_stats_write | ( | time_t | now, |
| bool | is_v3 ) |
If 24 hours have passed since the beginning of the current HS stats period, write buffer stats to $DATADIR/stats/hidserv-v3-stats (possibly overwriting an existing file) and reset counters. Return when we would next want to write buffer stats or 0 if we never want to write. Function works for both v2 and v3 stats depending on is_v3.
Definition at line 2743 of file rephist.c.
Referenced by write_stats_file_callback().
| void rep_hist_hsdir_stored_maybe_new_v3_onion | ( | const uint8_t * | blinded_key | ) |
We just received a new descriptor with blinded_key. See if we've seen this blinded key before, and if not add it to the stats.
Definition at line 2595 of file rephist.c.
Referenced by cache_store_v3_as_dir().
| void rep_hist_init | ( | void | ) |
Initialize the static data structures for tracking history.
Definition at line 625 of file rephist.c.
Referenced by tor_init().
| int rep_hist_load_mtbf_data | ( | time_t | now | ) |
Load MTBF data from disk. Returns 0 on success or recoverable error, -1 on failure.
Definition at line 1181 of file rephist.c.
Referenced by options_act_dirauth_mtbf().
| void rep_hist_log_circuit_handshake_stats | ( | time_t | now | ) |
Log our onionskin statistics since the last time we were called.
Definition at line 2437 of file rephist.c.
Referenced by log_heartbeat().
| void rep_hist_log_link_protocol_counts | ( | void | ) |
Log a heartbeat message explaining how many connections of each link protocol version we have used.
Definition at line 2962 of file rephist.c.
Referenced by log_heartbeat().
| void rep_hist_make_router_pessimal | ( | const char * | id, |
| time_t | when ) |
Mark a router with ID id as non-Running, and retroactively declare that it has never been running: give it no stability and no WFU.
Definition at line 760 of file rephist.c.
Referenced by dirserv_generate_networkstatus_vote_obj().
| void rep_hist_note_circuit_handshake_assigned | ( | uint16_t | type | ) |
We've sent an onionskin (using the type handshake) to a cpuworker.
Definition at line 2384 of file rephist.c.
Referenced by assign_onionskin_to_cpuworker().
| void rep_hist_note_circuit_handshake_dropped | ( | uint16_t | type | ) |
We've just drop an onionskin (using the type handshake) due to being overloaded.
Definition at line 2393 of file rephist.c.
Referenced by onion_pending_add().
| void rep_hist_note_circuit_handshake_requested | ( | uint16_t | type | ) |
A new onionskin (using the type handshake) has arrived.
Definition at line 2365 of file rephist.c.
Referenced by command_process_create_cell().
| void rep_hist_note_conn_closed | ( | bool | from_listener, |
| unsigned int | type, | ||
| int | af ) |
Note that a connection has closed of the given type.
Definition at line 1733 of file rephist.c.
Referenced by connection_mark_for_close_internal_().
| void rep_hist_note_conn_opened | ( | bool | from_listener, |
| unsigned int | type, | ||
| int | af ) |
Note that a connection has opened of the given type.
Definition at line 1710 of file rephist.c.
Referenced by listener_connection_new(), and note_connection().
| void rep_hist_note_conn_rejected | ( | unsigned int | type, |
| int | af ) |
Note that a connection has rejected of the given type.
Definition at line 1758 of file rephist.c.
Referenced by connection_exit_connect(), and connection_handle_listener_read().
| void rep_hist_note_desc_served | ( | const char * | desc | ) |
Called to note that we've served a given descriptor (by digest). Increments the count of descriptors served, and the number of times we've served this descriptor.
Definition at line 2215 of file rephist.c.
Referenced by handle_get_descriptor().
| void rep_hist_note_dns_error | ( | int | type, |
| uint8_t | error ) |
Note a DNS error for the given given libevent DNS record type and error code. Possible types are: DNS_IPv4_A, DNS_PTR, DNS_IPv6_AAAA.
NOTE: Libevent is not returning the type in case of an error and so if error is anything but DNS_ERR_NONE, the type is not usable and set to 0.
See: https://gitlab.torproject.org/tpo/core/tor/-/issues/40490
Definition at line 375 of file rephist.c.
Referenced by evdns_callback().
| void rep_hist_note_dns_request | ( | int | type | ) |
Note a DNS request for the given given libevent DNS record type.
Definition at line 434 of file rephist.c.
Referenced by launch_one_resolve().
| void rep_hist_note_exit_bytes | ( | uint16_t | port, |
| size_t | num_written, | ||
| size_t | num_read ) |
Note that we wrote num_written bytes and read num_read bytes to/from an exit connection to port.
Definition at line 1623 of file rephist.c.
Referenced by record_num_bytes_transferred_impl().
| void rep_hist_note_exit_stream | ( | unsigned int | cmd | ) |
Note a stream as seen for the given relay command.
Definition at line 1656 of file rephist.c.
Referenced by connection_exit_begin_resolve(), connection_exit_connect(), and connection_exit_connect_dir().
| void rep_hist_note_exit_stream_opened | ( | uint16_t | port | ) |
Note that we opened an exit stream to port.
Definition at line 1637 of file rephist.c.
Referenced by connection_edge_finished_connecting().
| void rep_hist_note_negotiated_link_proto | ( | unsigned | link_proto, |
| int | started_here ) |
Note that we negotiated link protocol version link_proto, on a connection that started here iff started_here is true.
Definition at line 2786 of file rephist.c.
Referenced by channel_tls_process_versions_cell().
| void rep_hist_note_overload | ( | overload_type_t | overload | ) |
Note down an overload event of type overload.
Definition at line 541 of file rephist.c.
Referenced by cell_queues_check_size(), connection_bucket_read_limit(), connection_bucket_write_limit(), overload_general_onionskin_assessment(), rep_hist_note_tcp_exhaustion(), and socket_failed_from_fd_exhaustion().
| void rep_hist_note_router_reachable | ( | const char * | id, |
| const tor_addr_t * | at_addr, | ||
| const uint16_t | at_port, | ||
| time_t | when ) |
We have just decided that this router with identity digest id is reachable, meaning we will give it a "Running" flag for the next while.
Definition at line 633 of file rephist.c.
Referenced by dirserv_orconn_tls_done(), and rep_hist_note_router_reachable().
| void rep_hist_note_router_unreachable | ( | const char * | id, |
| time_t | when ) |
We have just decided that this router is unreachable, meaning we are taking away its "Running" flag.
Definition at line 706 of file rephist.c.
Referenced by dirserv_set_router_is_running(), rep_hist_make_router_pessimal(), rep_hist_note_router_reachable(), rep_hist_record_mtbf_data(), and routerlist_remove().
| void rep_hist_note_tcp_exhaustion | ( | void | ) |
Note down that we've reached a TCP port exhaustion. This triggers an overload general event.
Definition at line 578 of file rephist.c.
Referenced by socket_failed_from_tcp_port_exhaustion().
| void rep_hist_padding_count_read | ( | padding_type_t | type | ) |
Count a cell that we've received for padding overhead statistics.
RELAY_COMMAND_DROP and CELL_PADDING are accounted separately. Both should be counted for PADDING_TYPE_TOTAL.
Definition at line 2846 of file rephist.c.
Referenced by channel_tls_handle_cell(), and circpad_deliver_recognized_relay_cell_events().
| void rep_hist_padding_count_timers | ( | uint64_t | num_timers | ) |
Update the maximum count of total pending channel padding timers in this period.
Definition at line 2802 of file rephist.c.
Referenced by channelpadding_schedule_padding().
| void rep_hist_padding_count_write | ( | padding_type_t | type | ) |
Count a cell that we sent for padding overhead statistics.
RELAY_COMMAND_DROP and CELL_PADDING are accounted separately. Both should be counted for PADDING_TYPE_TOTAL.
Definition at line 2816 of file rephist.c.
Referenced by circpad_send_padding_cell_for_callback(), connection_or_write_cell_to_buf(), connection_or_write_var_cell_to_buf(), and write_packed_cell().
| void rep_hist_prep_published_padding_counts | ( | time_t | now | ) |
| int rep_hist_record_mtbf_data | ( | time_t | now, |
| int | missing_means_down ) |
Write MTBF data to disk. Return 0 on success, negative on failure.
If missing_means_down, then if we're about to write an entry that is still considered up but isn't in our routerlist, consider it to be down.
Definition at line 1018 of file rephist.c.
Referenced by save_stability_callback(), and tor_cleanup().
| void rep_hist_reset_buffer_stats | ( | time_t | now | ) |
Clear history of circuit statistics and set the measurement interval start to now.
Definition at line 1930 of file rephist.c.
Referenced by rep_hist_buffer_stats_term(), and rep_hist_buffer_stats_write().
|
static |
Reset served descs stats to empty, starting a new interval now.
Definition at line 2108 of file rephist.c.
Referenced by rep_hist_desc_stats_write().
| void rep_hist_reset_exit_stats | ( | time_t | now | ) |
Reset counters for exit port statistics.
Definition at line 1406 of file rephist.c.
Referenced by rep_hist_exit_stats_write().
|
static |
Clear history of hidden service statistics and set the measurement interval start to now.
Definition at line 2488 of file rephist.c.
Referenced by rep_hist_hs_stats_term(), and rep_hist_hs_stats_write().
|
static |
Clear history of hidden service statistics and set the measurement interval start to now.
Definition at line 2563 of file rephist.c.
Referenced by rep_hist_hs_stats_term(), and rep_hist_hs_stats_write().
| void rep_hist_reset_padding_counts | ( | void | ) |
| void rep_hist_seen_new_rp_cell | ( | bool | is_v2 | ) |
We saw a new HS relay cell: count it! If is_v2 is set then it's a v2 RP cell, otherwise it's a v3.
Definition at line 2621 of file rephist.c.
Referenced by command_process_relay_cell().
| void rep_history_clean | ( | time_t | before | ) |
Remove history info for routers/links that haven't changed since before.
Definition at line 985 of file rephist.c.
Referenced by clean_caches_callback(), and rep_hist_dump_stats().
| STATIC bool should_collect_v3_stats | ( | void | ) |
Return true if it's a good time to collect v3 stats.
v3 stats have a strict stats collection period (from 12:00UTC to 12:00UTC on the real network). We don't want to collect statistics if (for example) we just booted and it's 03:00UTC; we will wait until 12:00UTC before we start collecting statistics to make sure that the final result represents the whole collection period. This behavior is controlled by rep_hist_hs_stats_init().
Definition at line 2587 of file rephist.c.
Referenced by rep_hist_hsdir_stored_maybe_new_v3_onion(), and rep_hist_seen_new_rp_cell().
|
static |
List of circ_buffer_stats_t.
Definition at line 1847 of file rephist.c.
Referenced by rep_hist_add_buffer_stats(), rep_hist_format_buffer_stats(), rep_hist_free_all(), and rep_hist_reset_buffer_stats().
|
static |
Number of connections created as in seen per direction per type.
Definition at line 1699 of file rephist.c.
Referenced by rep_hist_get_conn_created(), and rep_hist_note_conn_opened().
|
static |
Number of connections opened per direction per type.
Definition at line 1702 of file rephist.c.
Referenced by rep_hist_get_conn_opened(), rep_hist_note_conn_closed(), and rep_hist_note_conn_opened().
|
static |
Number of connections rejected per type. Always inbound.
Definition at line 1705 of file rephist.c.
Referenced by rep_hist_get_conn_rejected(), and rep_hist_note_conn_rejected().
|
static |
DNS query statistics store. It covers all type of queries.
Definition at line 281 of file rephist.c.
Referenced by get_dns_stats_by_type().
|
static |
Number of bytes read in current period by exit port
Definition at line 1385 of file rephist.c.
Referenced by rep_hist_exit_stats_init(), rep_hist_exit_stats_term(), rep_hist_format_exit_stats(), rep_hist_free_all(), rep_hist_note_exit_bytes(), and rep_hist_reset_exit_stats().
|
static |
Number of bytes written in current period by exit port
Definition at line 1387 of file rephist.c.
Referenced by rep_hist_exit_stats_init(), rep_hist_exit_stats_term(), rep_hist_format_exit_stats(), rep_hist_free_all(), rep_hist_note_exit_bytes(), and rep_hist_reset_exit_stats().
|
static |
Number of streams opened in current period by exit port
Definition at line 1389 of file rephist.c.
Referenced by rep_hist_exit_stats_init(), rep_hist_exit_stats_term(), rep_hist_format_exit_stats(), rep_hist_free_all(), rep_hist_note_exit_stream_opened(), and rep_hist_reset_exit_stats().
|
static |
Map from hex OR identity digest to or_history_t.
Definition at line 187 of file rephist.c.
Referenced by get_or_history(), rep_hist_downrate_old_runs(), rep_hist_dump_stats(), rep_hist_free_all(), rep_hist_init(), rep_hist_record_mtbf_data(), and rep_history_clean().
|
static |
Our v2 statistics structure singleton.
Definition at line 2459 of file rephist.c.
Referenced by rep_hist_format_hs_stats(), rep_hist_free_all(), rep_hist_hs_stats_init(), rep_hist_reset_hs_v2_stats(), and rep_hist_seen_new_rp_cell().
|
static |
Our v3 statistics structure singleton.
Definition at line 2533 of file rephist.c.
Referenced by rep_hist_format_hs_stats(), rep_hist_free_all(), rep_hist_hs_stats_init(), rep_hist_hsdir_stored_maybe_new_v3_onion(), rep_hist_reset_hs_v3_stats(), and rep_hist_seen_new_rp_cell().
|
static |
How many bad times has parse_possibly_bad_iso_time() parsed?
Definition at line 1136 of file rephist.c.
Referenced by parse_possibly_bad_iso_time(), and rep_hist_load_mtbf_data().
| STATIC int onion_handshakes_assigned[MAX_ONION_STAT_TYPE+1] = {0} |
| STATIC int onion_handshakes_requested[MAX_ONION_STAT_TYPE+1] = {0} |
Internal statistics to track how many requests of each type of handshake we've received, and how many we've assigned to cpuworkers. Useful for seeing trends in cpu load.
They are reset at every heartbeat.
Definition at line 2237 of file rephist.c.
Referenced by rep_hist_get_circuit_handshake_requested(), rep_hist_log_circuit_handshake_stats(), and rep_hist_note_circuit_handshake_requested().
|
static |
Keep track of the DNS requests for the general overload state.
Definition at line 244 of file rephist.c.
Referenced by rep_hist_note_dns_error().
|
static |
Keep track of the onionskin requests for an assessment period.
Definition at line 2294 of file rephist.c.
Referenced by overload_general_onionskin_assessment(), rep_hist_note_circuit_handshake_dropped(), and rep_hist_note_circuit_handshake_requested().
|
static |
Consensus parameter: indicate what fraction of ntor onionskin drop over the total number of requests must be reached before we trigger a general overload signal.
Definition at line 2257 of file rephist.c.
Referenced by overload_general_onionskin_assessment(), and rep_hist_consensus_has_changed().
|
static |
Consensus parameter: Period, in seconds, over which we count the number of ntor onionskins requests and how many were dropped. After that period, we assess if we trigger an overload or not.
Definition at line 2271 of file rephist.c.
Referenced by overload_general_onionskin_assessment(), and rep_hist_consensus_has_changed().
|
static |
Current state of overload stats
Definition at line 211 of file rephist.c.
Referenced by rep_hist_get_overload_general_line(), rep_hist_get_overload_stats_lines(), and rep_hist_note_overload().
|
static |
Holds the current values of our padding statistics. It is not published until it is transferred to padding_published.
Definition at line 173 of file rephist.c.
Referenced by rep_hist_padding_count_read(), rep_hist_padding_count_timers(), rep_hist_padding_count_write(), and rep_hist_reset_padding_counts().
|
static |
Remains fixed for a 24 hour period, and then is replaced by a redacted copy of padding_current
Definition at line 177 of file rephist.c.
Referenced by rep_hist_get_padding_count_lines().
|
static |
Counter of the total number of DROP cell received.
Definition at line 284 of file rephist.c.
Referenced by rep_hist_get_drop_cell_received_count(), and rep_hist_padding_count_write().
| uint64_t rephist_total_alloc =0 |
Total number of bytes currently allocated in fields used by rephist.c.
Definition at line 95 of file rephist.c.
Referenced by dumpmemusage(), free_or_history(), get_or_history(), and rep_hist_free_all().
| uint32_t rephist_total_num =0 |
Number of or_history_t objects currently allocated.
Definition at line 97 of file rephist.c.
Referenced by dumpmemusage(), free_or_history(), get_or_history(), and rep_hist_free_all().
|
static |
Digestmap to track which descriptors were downloaded this stats collection interval. It maps descriptor digest to pointers to 1, effectively turning this into a list.
Definition at line 2083 of file rephist.c.
Referenced by rep_hist_desc_stats_init(), rep_hist_desc_stats_term(), rep_hist_format_desc_stats(), and rep_hist_note_desc_served().
|
static |
When did we last multiply all routers' weighted_run_length and total_run_weights by STABILITY_ALPHA?
Definition at line 181 of file rephist.c.
Referenced by rep_hist_downrate_old_runs(), rep_hist_load_mtbf_data(), and rep_hist_record_mtbf_data().
|
static |
Start of the current buffer stats interval or 0 if we're not collecting buffer statistics.
Definition at line 1826 of file rephist.c.
Referenced by rep_hist_add_buffer_stats(), rep_hist_buffer_stats_add_circ(), rep_hist_buffer_stats_init(), rep_hist_buffer_stats_write(), rep_hist_format_buffer_stats(), and rep_hist_reset_buffer_stats().
|
static |
Start time of exit stats or 0 if we're not collecting exit stats.
Definition at line 1392 of file rephist.c.
Referenced by rep_hist_exit_stats_init(), rep_hist_exit_stats_term(), rep_hist_exit_stats_write(), rep_hist_format_exit_stats(), rep_hist_note_exit_bytes(), rep_hist_note_exit_stream_opened(), and rep_hist_reset_exit_stats().
|
static |
Start of the current hidden service stats interval or 0 if we're not collecting hidden service statistics.
Definition at line 2456 of file rephist.c.
Referenced by rep_hist_format_hs_stats(), rep_hist_hs_stats_init(), rep_hist_hs_stats_write(), and rep_hist_reset_hs_v2_stats().
|
static |
Start of the current hidden service stats interval or 0 if we're not collecting hidden service statistics.
This is particularly important for v3 statistics since this variable controls the start time of initial v3 stats collection. It's initialized by rep_hist_hs_stats_init() to the next time period start (i.e. 12:00UTC), and should_collect_v3_stats() ensures that functions that collect v3 stats do not do so sooner than that.
Collecting stats from 12:00UTC to 12:00UTC is extremely important for v3 stats because rep_hist_hsdir_stored_maybe_new_v3_onion() uses the blinded key of each onion service as its double-counting index. Onion services rotate their descriptor at around 00:00UTC which means that their blinded key also changes around that time. However the precise time that onion services rotate their descriptors is actually when they fetch a new 00:00UTC consensus and that happens at a random time (e.g. it can even happen at 02:00UTC). This means that if we started keeping v3 stats at around 00:00UTC we wouldn't be able to tell when onion services change their blinded key and hence we would double count an unpredictable amount of them (for example, if an onion service fetches the 00:00UTC consensus at 01:00UTC it would upload to its old HSDir at 00:45UTC, and then to a different HSDir at 01:50UTC).
For this reason, we start collecting statistics at 12:00UTC. This way we know that by the time we stop collecting statistics for that time period 24 hours later, all the onion services have switched to their new blinded key. This way we can predict much better how much double counting has been performed.
Definition at line 2530 of file rephist.c.
Referenced by rep_hist_format_hs_stats(), rep_hist_hs_stats_init(), rep_hist_hs_stats_write(), rep_hist_reset_hs_v3_stats(), and should_collect_v3_stats().
|
static |
Start time of served descs stats or 0 if we're not collecting those.
Definition at line 2090 of file rephist.c.
Referenced by rep_hist_desc_stats_init(), rep_hist_desc_stats_term(), rep_hist_desc_stats_write(), and rep_hist_format_desc_stats().
|
static |
Counters keeping the same stats as above but for the entire duration of the process (not reset).
Definition at line 2243 of file rephist.c.
Referenced by rep_hist_get_circuit_n_handshake_assigned(), and rep_hist_note_circuit_handshake_assigned().
|
static |
|
static |
Counters to count the number of times we've reached an overload for the global connection read/write limit. Reported on the MetricsPort.
Definition at line 215 of file rephist.c.
Referenced by rep_hist_get_n_read_limit_reached(), and rep_hist_note_overload().
|
static |
Total number of times we've reached TCP port exhaustion.
Definition at line 219 of file rephist.c.
Referenced by rep_hist_get_n_tcp_exhaustion(), and rep_hist_note_tcp_exhaustion().
|
static |
Number of BEGIN streams seen.
Definition at line 1648 of file rephist.c.
Referenced by rep_hist_get_exit_stream_seen(), and rep_hist_note_exit_stream().
|
static |
Number of BEGIN_DIR streams seen.
Definition at line 1650 of file rephist.c.
Referenced by rep_hist_get_exit_stream_seen(), and rep_hist_note_exit_stream().
|
static |
Number of RESOLVE streams seen.
Definition at line 1652 of file rephist.c.
Referenced by rep_hist_get_exit_stream_seen(), and rep_hist_note_exit_stream().
|
static |
Number of how many descriptors were downloaded in total during this interval.
Definition at line 2087 of file rephist.c.
Referenced by rep_hist_desc_stats_init(), rep_hist_desc_stats_term(), rep_hist_format_desc_stats(), rep_hist_free_all(), and rep_hist_note_desc_served().