summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-09-04 11:16:53 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-09-04 11:16:53 +0000
commit5bee815f7f9045db667bf9a1b0d5fddd94c704e4 (patch)
tree6693982d886ae22e8edaaf9ad4815e2755fd7322 /src
parentaacb26706179e91c67bc5c7da86d146997a5ab61 (diff)
downloads6-dns-5bee815f7f9045db667bf9a1b0d5fddd94c704e4.tar.xz
Use stopwatches
Diffstat (limited to 'src')
-rw-r--r--src/clients/s6-dnsip4.c1
-rw-r--r--src/clients/s6-dnsip6.c1
-rw-r--r--src/clients/s6-dnsmx.c1
-rw-r--r--src/clients/s6-dnsname.c3
-rw-r--r--src/clients/s6-dnsns.c1
-rw-r--r--src/clients/s6-dnsq.c1
-rw-r--r--src/clients/s6-dnsqr.c1
-rw-r--r--src/clients/s6-dnssoa.c1
-rw-r--r--src/clients/s6-dnssrv.c1
-rw-r--r--src/clients/s6-dnstxt.c1
-rw-r--r--src/clients/s6dns_generic_filter_main.c1
-rw-r--r--src/skadns/skadnsd.c1
12 files changed, 13 insertions, 1 deletions
diff --git a/src/clients/s6-dnsip4.c b/src/clients/s6-dnsip4.c
index 5d5ef54..8458099 100644
--- a/src/clients/s6-dnsip4.c
+++ b/src/clients/s6-dnsip4.c
@@ -39,6 +39,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 1) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnsip6.c b/src/clients/s6-dnsip6.c
index 62c337b..7e59f80 100644
--- a/src/clients/s6-dnsip6.c
+++ b/src/clients/s6-dnsip6.c
@@ -39,6 +39,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 1) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnsmx.c b/src/clients/s6-dnsmx.c
index 41fe089..c28894e 100644
--- a/src/clients/s6-dnsmx.c
+++ b/src/clients/s6-dnsmx.c
@@ -38,6 +38,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 1) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnsname.c b/src/clients/s6-dnsname.c
index 87debde..ab1fd4b 100644
--- a/src/clients/s6-dnsname.c
+++ b/src/clients/s6-dnsname.c
@@ -52,7 +52,8 @@ int main (int argc, char const *const *argv)
ip.is6 = 1 ;
}
else if (!ip4_scan(argv[0], ip.ip)) dieusage() ;
-
+
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnsns.c b/src/clients/s6-dnsns.c
index b54ff24..a1a6b09 100644
--- a/src/clients/s6-dnsns.c
+++ b/src/clients/s6-dnsns.c
@@ -38,6 +38,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 1) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnsq.c b/src/clients/s6-dnsq.c
index 9f36716..3113025 100644
--- a/src/clients/s6-dnsq.c
+++ b/src/clients/s6-dnsq.c
@@ -75,6 +75,7 @@ int main (int argc, char const *const *argv)
}
if (debuglevel & 1) dbh.post_recv = &s6dns_debug_dumpdt_post_recv ;
if (debuglevel & 2) { dbh.pre_send = &s6dns_debug_dumpdt_pre_send ; dbh.post_send = &s6dns_debug_dumpdt_post_send ; }
+ tain_now_set_stopwatch() ;
tain_now_g() ;
tain_add_g(&deadline, &deadline) ;
if (!s6dns_engine_init_r_g(&s6dns_engine_here, &servers, 0, d.s, d.len, qtype, &dbh, &deadline))
diff --git a/src/clients/s6-dnsqr.c b/src/clients/s6-dnsqr.c
index ed66ff9..186ae75 100644
--- a/src/clients/s6-dnsqr.c
+++ b/src/clients/s6-dnsqr.c
@@ -52,6 +52,7 @@ int main (int argc, char const *const *argv)
dbh.external = where ;
if (debuglevel & 1) dbh.post_recv = &s6dns_debug_dumpdt_post_recv ;
if (debuglevel & 2) { dbh.pre_send = &s6dns_debug_dumpdt_pre_send ; dbh.post_send = &s6dns_debug_dumpdt_post_send ; }
+ tain_now_set_stopwatch() ;
tain_now_g() ;
tain_add_g(&deadline, &deadline) ;
if (!s6dns_init()) strerr_diefu1sys(111, "s6dns_init") ;
diff --git a/src/clients/s6-dnssoa.c b/src/clients/s6-dnssoa.c
index 68fa4d4..9d42d8f 100644
--- a/src/clients/s6-dnssoa.c
+++ b/src/clients/s6-dnssoa.c
@@ -39,6 +39,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 1) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnssrv.c b/src/clients/s6-dnssrv.c
index ecc3db6..0845ffb 100644
--- a/src/clients/s6-dnssrv.c
+++ b/src/clients/s6-dnssrv.c
@@ -39,6 +39,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 3) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add_g(&deadline, &deadline) ;
diff --git a/src/clients/s6-dnstxt.c b/src/clients/s6-dnstxt.c
index df5aee1..622f9bb 100644
--- a/src/clients/s6-dnstxt.c
+++ b/src/clients/s6-dnstxt.c
@@ -43,6 +43,7 @@ int main (int argc, char const *const *argv)
argc -= subgetopt_here.ind ; argv += subgetopt_here.ind ;
if (argc < 1) dieusage() ;
+ tain_now_set_stopwatch() ;
tain_now(&stamp) ;
if (t) tain_from_millisecs(&deadline, t) ; else deadline = tain_infinite_relative ;
tain_add(&deadline, &deadline, &stamp) ;
diff --git a/src/clients/s6dns_generic_filter_main.c b/src/clients/s6dns_generic_filter_main.c
index ba9534e..c7373b2 100644
--- a/src/clients/s6dns_generic_filter_main.c
+++ b/src/clients/s6dns_generic_filter_main.c
@@ -78,6 +78,7 @@ int s6dns_generic_filter_main (int argc, char const *const *argv, char const *co
if (maxconn > SKADNS_MAXCONCURRENCY) maxconn = SKADNS_MAXCONCURRENCY ;
if (maxlines < maxconn) maxlines = maxconn ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
tain_addsec_g(&deadline, 2) ;
if (!skadns_startf_g(&a, &deadline))
diff --git a/src/skadns/skadnsd.c b/src/skadns/skadnsd.c
index 9f6a945..bbbcefd 100644
--- a/src/skadns/skadnsd.c
+++ b/src/skadns/skadnsd.c
@@ -112,6 +112,7 @@ int main (void)
if (ndelay_on(0) < 0) strerr_diefu2sys(111, "ndelay_on ", "0") ;
if (ndelay_on(1) < 0) strerr_diefu2sys(111, "ndelay_on ", "1") ;
if (sig_ignore(SIGPIPE) < 0) strerr_diefu1sys(111, "ignore SIGPIPE") ;
+ tain_now_set_stopwatch() ;
tain_now_g() ;
if (!s6dns_init()) strerr_diefu1sys(111, "s6dns_init") ;