aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index d371276b18..5ab4b46d5f 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -200,6 +200,7 @@ static config_var_t _option_vars[] = {
V(ClientOnly, BOOL, "0"),
V(ConsensusParams, STRING, NULL),
V(ConnLimit, UINT, "1000"),
+ V(ConnStatistics, BOOL, "0"),
V(ConstrainedSockets, BOOL, "0"),
V(ConstrainedSockSize, MEMUNIT, "8192"),
V(ContactInfo, STRING, NULL),
@@ -1391,7 +1392,8 @@ options_act(or_options_t *old_options)
}
if (options->CellStatistics || options->DirReqStatistics ||
- options->EntryStatistics || options->ExitPortStatistics) {
+ options->EntryStatistics || options->ExitPortStatistics ||
+ options->ConnStatistics) {
time_t now = time(NULL);
if ((!old_options || !old_options->CellStatistics) &&
options->CellStatistics)
@@ -1405,6 +1407,9 @@ options_act(or_options_t *old_options)
if ((!old_options || !old_options->ExitPortStatistics) &&
options->ExitPortStatistics)
rep_hist_exit_stats_init(now);
+ if ((!old_options || !old_options->ConnStatistics) &&
+ options->ConnStatistics)
+ rep_hist_conn_stats_init(now);
if (!old_options)
log_notice(LD_CONFIG, "Configured to measure statistics. Look for "
"the *-stats files that will first be written to the "
@@ -1423,6 +1428,9 @@ options_act(or_options_t *old_options)
if (old_options && old_options->ExitPortStatistics &&
!options->ExitPortStatistics)
rep_hist_exit_stats_term();
+ if (old_options && old_options->ConnStatistics &&
+ !options->ConnStatistics)
+ rep_hist_conn_stats_term();
/* Check if we need to parse and add the EntryNodes config option. */
if (options->EntryNodes &&