aboutsummaryrefslogtreecommitdiff
path: root/src/feature/stats/rephist.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2020-10-21 14:17:30 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2020-11-03 11:12:17 +0200
commit131da887d75bd112e668db3c1695ad8cc5a76433 (patch)
tree9adf7e0cd9bbbd3f5203ade14c661515df460b3a /src/feature/stats/rephist.c
parent5c00bee1b1cde4bb77a2e3fa1f5110850ddede6e (diff)
downloadtor-131da887d75bd112e668db3c1695ad8cc5a76433.tar.gz
tor-131da887d75bd112e668db3c1695ad8cc5a76433.zip
Write unittests for v3 metrics.
Diffstat (limited to 'src/feature/stats/rephist.c')
-rw-r--r--src/feature/stats/rephist.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/stats/rephist.c b/src/feature/stats/rephist.c
index 24712707ca..ada19b447a 100644
--- a/src/feature/stats/rephist.c
+++ b/src/feature/stats/rephist.c
@@ -1871,8 +1871,8 @@ rep_hist_reset_hs_v3_stats(time_t now)
* on the real network) and hence we don't want to collect statistics if it's
* not yet the time to do so.
*/
-static bool
-should_collect_v3_stats(void)
+MOCK_IMPL(STATIC bool,
+should_collect_v3_stats,(void))
{
return start_of_hs_v3_stats_interval <= approx_time();
}
@@ -1973,7 +1973,7 @@ rep_hist_hs_stats_term(void)
/** Allocate and return a string containing hidden service stats that
* are meant to be placed in the extra-info descriptor. */
-static char *
+STATIC char *
rep_hist_format_hs_v2_stats(time_t now)
{
char t[ISO_TIME_LEN+1];