summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-11-28 10:40:30 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-11-28 10:40:30 +0000
commitc9dfdfd5d9624a9915c59c9b3942831a95e6fc1f (patch)
tree03d5e0d1f185b35aa96d4ed8c9d776dc76c78a7e /sbin
parent93cf9b9a258233a31b79ec5f62feac0ca0056f0a (diff)
show median RTT in unwindctl status
Diffstat (limited to 'sbin')
-rw-r--r--sbin/unwind/resolver.c3
-rw-r--r--sbin/unwind/resolver.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/sbin/unwind/resolver.c b/sbin/unwind/resolver.c
index ff1bf870ac6..b029c5ac897 100644
--- a/sbin/unwind/resolver.c
+++ b/sbin/unwind/resolver.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolver.c,v 1.81 2019/11/28 10:02:44 florian Exp $ */
+/* $OpenBSD: resolver.c,v 1.82 2019/11/28 10:40:29 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -1691,6 +1691,7 @@ send_resolver_info(struct uw_resolver *res, pid_t pid)
cri.state = res->state;
cri.type = res->type;
cri.oppdot = res->oppdot;
+ cri.median = histogram_median(res->latest_histogram);
resolver_imsg_compose_frontend(IMSG_CTL_RESOLVER_INFO, pid, &cri,
sizeof(cri));
}
diff --git a/sbin/unwind/resolver.h b/sbin/unwind/resolver.h
index 12f8e7c79e5..27c712fe8ad 100644
--- a/sbin/unwind/resolver.h
+++ b/sbin/unwind/resolver.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: resolver.h,v 1.13 2019/11/28 10:02:44 florian Exp $ */
+/* $OpenBSD: resolver.h,v 1.14 2019/11/28 10:40:29 florian Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -49,6 +49,7 @@ static const int64_t histogram_limits[] = {
struct ctl_resolver_info {
enum uw_resolver_state state;
enum uw_resolver_type type;
+ int64_t median;
int oppdot;
};