summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2009-09-24 21:58:56 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2009-09-24 21:58:56 +0200
commit457bebe01a0cffc7b2603e87611f0e5820f1cca4 (patch)
tree28bf44a9765c75686120c774a4531b0bcdf6fe6f /src/or/main.c
parent52fa4f6428388be34f78951ed0a140b01a44a86c (diff)
downloadtor-457bebe01a0cffc7b2603e87611f0e5820f1cca4.tar.gz
tor-457bebe01a0cffc7b2603e87611f0e5820f1cca4.zip
Fix a couple of smaller issues with gathering statistics.
- Avoid memmoving 0 bytes which might lead to compiler warnings. - Don't require relays to be entry node AND bridge at the same to time to record clients. - Fix a memory leak when writing dirreq-stats. - Don't say in the stats files that measurement intervals are twice as long as they really are. - Reduce minimum observation time for requests to 12 hours, or we might never record usage. - Clear exit stats correctly after writing them, or we accumulate old stats over time. - Reset interval start for buffer stats, too.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index c33d1b39b4..25182919ae 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -981,7 +981,6 @@ run_scheduled_events(time_t now)
time_to_write_stats_files = now + WRITE_STATS_INTERVAL;
} else {
/* Write stats to disk. */
- time_to_write_stats_files += WRITE_STATS_INTERVAL;
if (options->CellStatistics)
rep_hist_buffer_stats_write(time_to_write_stats_files);
if (options->DirReqStatistics)
@@ -990,6 +989,7 @@ run_scheduled_events(time_t now)
geoip_entry_stats_write(time_to_write_stats_files);
if (options->ExitPortStatistics)
rep_hist_exit_stats_write(time_to_write_stats_files);
+ time_to_write_stats_files += WRITE_STATS_INTERVAL;
}
} else {
/* Never write stats to disk */