summaryrefslogtreecommitdiff
path: root/src/test/test_stats.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-07-10 09:11:12 -0400
committerNick Mathewson <nickm@torproject.org>2020-07-10 09:27:42 -0400
commit3f2de0bcca301785c5f1911354f2d3f4d5ba1708 (patch)
tree1b7d452c8a8e8eeca7e3fcf2f71bfd435d43024e /src/test/test_stats.c
parent50bf2520b33eb9f477c1b8989264667c5b587a01 (diff)
downloadtor-3f2de0bcca301785c5f1911354f2d3f4d5ba1708.tar.gz
tor-3f2de0bcca301785c5f1911354f2d3f4d5ba1708.zip
Change connstats.c identifers to start with conn_stats
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ rep_hist_conn_stats_init conn_stats_init \ rep_hist_note_or_conn_bytes conn_stats_note_or_conn_bytes \ rep_hist_reset_conn_stats conn_stats_reset \ rep_hist_format_conn_stats conn_stats_format \ rep_hist_conn_stats_write conn_stats_save \ rep_hist_conn_stats_term conn_stats_terminate \ bidi_map_free_all conn_stats_free_all
Diffstat (limited to 'src/test/test_stats.c')
-rw-r--r--src/test/test_stats.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/test/test_stats.c b/src/test/test_stats.c
index c8a76e27d9..288757229a 100644
--- a/src/test/test_stats.c
+++ b/src/test/test_stats.c
@@ -112,36 +112,36 @@ test_stats(void *arg)
/* Continue with testing connection statistics; we shouldn't collect
* conn stats without initializing them. */
- rep_hist_note_or_conn_bytes(1, 20, 400, now);
- s = rep_hist_format_conn_stats(now + 86400);
+ conn_stats_note_or_conn_bytes(1, 20, 400, now);
+ s = conn_stats_format(now + 86400);
tt_ptr_op(s, OP_EQ, NULL);
/* Initialize stats, note bytes, and generate history string. */
- rep_hist_conn_stats_init(now);
- rep_hist_note_or_conn_bytes(1, 30000, 400000, now);
- rep_hist_note_or_conn_bytes(1, 30000, 400000, now + 5);
- rep_hist_note_or_conn_bytes(2, 400000, 30000, now + 10);
- rep_hist_note_or_conn_bytes(2, 400000, 30000, now + 15);
- s = rep_hist_format_conn_stats(now + 86400);
+ conn_stats_init(now);
+ conn_stats_note_or_conn_bytes(1, 30000, 400000, now);
+ conn_stats_note_or_conn_bytes(1, 30000, 400000, now + 5);
+ conn_stats_note_or_conn_bytes(2, 400000, 30000, now + 10);
+ conn_stats_note_or_conn_bytes(2, 400000, 30000, now + 15);
+ s = conn_stats_format(now + 86400);
tt_str_op("conn-bi-direct 2010-08-12 13:27:30 (86400 s) 0,0,1,0\n",OP_EQ, s);
tor_free(s);
/* Stop collecting stats, add some bytes, and ensure we don't generate
* a history string. */
- rep_hist_conn_stats_term();
- rep_hist_note_or_conn_bytes(2, 400000, 30000, now + 15);
- s = rep_hist_format_conn_stats(now + 86400);
+ conn_stats_terminate();
+ conn_stats_note_or_conn_bytes(2, 400000, 30000, now + 15);
+ s = conn_stats_format(now + 86400);
tt_ptr_op(s, OP_EQ, NULL);
/* Re-start stats, add some bytes, reset stats, and see what history we
* get when observing no bytes at all. */
- rep_hist_conn_stats_init(now);
- rep_hist_note_or_conn_bytes(1, 30000, 400000, now);
- rep_hist_note_or_conn_bytes(1, 30000, 400000, now + 5);
- rep_hist_note_or_conn_bytes(2, 400000, 30000, now + 10);
- rep_hist_note_or_conn_bytes(2, 400000, 30000, now + 15);
- rep_hist_reset_conn_stats(now);
- s = rep_hist_format_conn_stats(now + 86400);
+ conn_stats_init(now);
+ conn_stats_note_or_conn_bytes(1, 30000, 400000, now);
+ conn_stats_note_or_conn_bytes(1, 30000, 400000, now + 5);
+ conn_stats_note_or_conn_bytes(2, 400000, 30000, now + 10);
+ conn_stats_note_or_conn_bytes(2, 400000, 30000, now + 15);
+ conn_stats_reset(now);
+ s = conn_stats_format(now + 86400);
tt_str_op("conn-bi-direct 2010-08-12 13:27:30 (86400 s) 0,0,0,0\n",OP_EQ, s);
tor_free(s);