From 457bebe01a0cffc7b2603e87611f0e5820f1cca4 Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Thu, 24 Sep 2009 21:58:56 +0200 Subject: 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. --- src/or/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/or/main.c') 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 */ -- cgit v1.2.3-54-g00ecf