aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.h
diff options
context:
space:
mode:
authorDavid Goulet <dgoulet@torproject.org>2021-10-20 09:59:04 -0400
committerDavid Goulet <dgoulet@torproject.org>2021-10-20 10:00:03 -0400
commit7a8108ea87320da3008e65747baa43c1bbcf13c2 (patch)
tree380e171d32b66081529847027a2eb4415061df10 /src/feature/stats/rephist.h
parent3752a71ded247cd6b32e0ee6c3dfaf906a63a915 (diff)
downloadtor-7a8108ea87320da3008e65747baa43c1bbcf13c2.tar.gz
tor-7a8108ea87320da3008e65747baa43c1bbcf13c2.zip
relay: Overload state on DNS timeout is now X% over Y secs
With this commit, we will only report a general overload state if we've seen more than X% of DNS timeout errors over Y seconds. Previous behavior was to report when a single timeout occured which is really too small of a threshold. The value X is a consensus parameters called "overload_dns_timeout_scale_percent" which is a scaled percentage (factor of 1000) so we can represent decimal points for X like 0.5% for instance. Its default is 1000 which ends up being 1%. The value Y is a consensus parameters called "overload_dns_timeout_period_secs" which is the time period for which will gather DNS errors and once over, we assess if that X% has been reached ultimately triggering a general overload signal. Closes #40491 Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/stats/rephist.h')
-rw-r--r--src/feature/stats/rephist.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/stats/rephist.h b/src/feature/stats/rephist.h
index 7f414de4c8..6918ed18c2 100644
--- a/src/feature/stats/rephist.h
+++ b/src/feature/stats/rephist.h
@@ -89,6 +89,8 @@ uint64_t rep_hist_get_n_dns_request(int type);
void rep_hist_note_dns_request(int type);
void rep_hist_note_dns_error(int type, uint8_t error);
+void rep_hist_consensus_has_changed(const networkstatus_t *ns);
+
extern uint64_t rephist_total_alloc;
extern uint32_t rephist_total_num;
#ifdef TOR_UNIT_TESTS