summaryrefslogtreecommitdiff
path: root/src/or/rephist.h
diff options
context:
space:
mode:
authorKarsten Loesing <karsten.loesing@gmx.net>2011-08-03 13:26:49 +0200
committerKarsten Loesing <karsten.loesing@gmx.net>2011-08-04 21:18:18 +0200
commit07dc46e7fc7275fa1fcd365e34f318aa164fe7f1 (patch)
tree734cae7417a48ad61695e2680bf34b7ba95178f0 /src/or/rephist.h
parent95ebd01e6225fecc2af6d9adb0167f1ab6a363fc (diff)
downloadtor-07dc46e7fc7275fa1fcd365e34f318aa164fe7f1.tar.gz
tor-07dc46e7fc7275fa1fcd365e34f318aa164fe7f1.zip
Separate generation of a buffer-stats string from writing it to disk.
The new rep_hist_format_buffer_stats() generates a buffer-stats string that rep_hist_buffer_stats_write() writes to disk. All the state changing (e.g., resetting the buffer-stats history and initializing the next measurement interval) takes place in rep_hist_buffer_stats_write(). That allows us to finally test the buffer-stats code better.
Diffstat (limited to 'src/or/rephist.h')
-rw-r--r--src/or/rephist.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/rephist.h b/src/or/rephist.h
index 5748748a80..13dee1529b 100644
--- a/src/or/rephist.h
+++ b/src/or/rephist.h
@@ -77,6 +77,8 @@ void rep_hist_buffer_stats_add_circ(circuit_t *circ,
time_t end_of_interval);
time_t rep_hist_buffer_stats_write(time_t now);
void rep_hist_buffer_stats_term(void);
+char *rep_hist_format_buffer_stats(time_t now);
+void rep_hist_reset_buffer_stats(time_t now);
void rep_hist_conn_stats_init(time_t now);
void rep_hist_note_or_conn_bytes(uint64_t conn_id, size_t num_read,