diff options
author | Karsten Loesing <karsten.loesing@gmx.net> | 2011-08-04 12:28:12 +0200 |
---|---|---|
committer | Karsten Loesing <karsten.loesing@gmx.net> | 2011-08-04 21:18:19 +0200 |
commit | 2174fc0ba036f3b0143d14626b431fa93ee6653d (patch) | |
tree | f2161ba75c2702830124ce439e6b12c6ba19c80d /src/or/geoip.h | |
parent | abeaabba00a8c8e089b71fe8831f3ee5462ba604 (diff) | |
download | tor-2174fc0ba036f3b0143d14626b431fa93ee6653d.tar.gz tor-2174fc0ba036f3b0143d14626b431fa93ee6653d.zip |
Separate generation of a dirreq-stats string from writing it to disk.
This patch separates the generation of a dirreq-stats string from
actually writing it to disk. The new geoip_format_dirreq_stats()
generates a dirreq-stats string that geoip_dirreq_stats_write() writes
to disk. All the state changing (e.g., resetting the dirreq-stats
history and initializing the next measurement interval) takes place in
geoip_dirreq_stats_write(). That allows us to finally test the
dirreq-stats code better.
Diffstat (limited to 'src/or/geoip.h')
-rw-r--r-- | src/or/geoip.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/geoip.h b/src/or/geoip.h index b50da74dc3..3472ee2b78 100644 --- a/src/or/geoip.h +++ b/src/or/geoip.h @@ -43,6 +43,8 @@ void geoip_change_dirreq_state(uint64_t dirreq_id, dirreq_type_t type, dirreq_state_t new_state); void geoip_dirreq_stats_init(time_t now); +void geoip_reset_dirreq_stats(time_t now); +char *geoip_format_dirreq_stats(time_t now); time_t geoip_dirreq_stats_write(time_t now); void geoip_dirreq_stats_term(void); void geoip_entry_stats_init(time_t now); |