aboutsummaryrefslogtreecommitdiff
path: root/stats.h
diff options
context:
space:
mode:
authorMike Yu <yumike@google.com>2020-02-10 21:11:05 +0800
committerMike Yu <yumike@google.com>2020-02-20 17:30:57 +0800
commit6407ae47fcaf8e00ac32f7fd9e65860952eeb3aa (patch)
tree6c821bef26300da50eda1cb9d1f04598651a4207 /stats.h
parentc573a3d76a3ace472353e6620a91a4b8b54cb0f8 (diff)
downloadDnsResolver-6407ae47fcaf8e00ac32f7fd9e65860952eeb3aa.tar.gz
Move the legacy stats function declarations out of resolv_private.h
No functionality changes. Bug: 137169582 Test: cd packages/modules/DnsResolver && mm Change-Id: I2aa236f8f3de1582cae820d761295d388b6baee7
Diffstat (limited to 'stats.h')
-rw-r--r--stats.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/stats.h b/stats.h
index cc7de9f5..698c8c29 100644
--- a/stats.h
+++ b/stats.h
@@ -55,3 +55,9 @@ int android_net_res_stats_get_info_for_net(unsigned netid, int* nscount,
// Returns an array of bools indicating which servers are considered good
int android_net_res_stats_get_usable_servers(const res_params* params, res_stats stats[],
int nscount, bool valid_servers[]);
+
+// Calculate the round-trip-time from start time t0 and end time t1.
+int res_stats_calculate_rtt(const timespec* t1, const timespec* t0);
+
+// Create a sample for calculating server reachability statistics.
+void res_stats_set_sample(res_sample* sample, time_t now, int rcode, int rtt);