Adding upstream version 2.14.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
5ce9e09973
commit
bc35471cfe
45 changed files with 1468 additions and 192 deletions
27
CHANGES
27
CHANGES
|
@ -1,3 +1,30 @@
|
||||||
|
2024-01-18 Jerry Lundström
|
||||||
|
|
||||||
|
Release 2.14.0
|
||||||
|
|
||||||
|
This release rewords connection statistics, adds names to threads and
|
||||||
|
fixes a bug with using TSIG in more than one thread.
|
||||||
|
|
||||||
|
In "Connection Statistics", reconnections has been renamed to
|
||||||
|
connection attempts and now includes both the initial connection
|
||||||
|
attempt and following reconnections.
|
||||||
|
|
||||||
|
If supported, threads will now be named after what they do, such as
|
||||||
|
"perf-send-<num>" and "perf-recv-<num>".
|
||||||
|
|
||||||
|
The TSIG context was shared between all threads and would case a crash
|
||||||
|
if more than one sending thread was used. This has been fixed and TSIG
|
||||||
|
contexts are now per thread.
|
||||||
|
|
||||||
|
81dc36b TSIG context per thread
|
||||||
|
55011c6 Thread names
|
||||||
|
8bdd480 thread names
|
||||||
|
17c680d Set thread names for dnsperf
|
||||||
|
54e641d Add library function to set thread names
|
||||||
|
fb19440 Dockerfile
|
||||||
|
a80de21 Reword connection statistics
|
||||||
|
688a4fd Reword connection statistics
|
||||||
|
|
||||||
2023-08-23 Jerry Lundström
|
2023-08-23 Jerry Lundström
|
||||||
|
|
||||||
Release 2.13.1
|
Release 2.13.1
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -100,7 +100,7 @@ The contrib directory contains additional software related to `dnsperf` and
|
||||||
## License
|
## License
|
||||||
|
|
||||||
```
|
```
|
||||||
Copyright 2019-2023 OARC, Inc.
|
Copyright 2019-2024 OARC, Inc.
|
||||||
Copyright 2017-2018 Akamai Technologies
|
Copyright 2017-2018 Akamai Technologies
|
||||||
Copyright 2006-2016 Nominum, Inc.
|
Copyright 2006-2016 Nominum, Inc.
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
10
configure.ac
10
configure.ac
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
@ -16,12 +16,16 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
AC_PREREQ(2.64)
|
AC_PREREQ(2.64)
|
||||||
AC_INIT([dnsperf], [2.13.1], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues])
|
AC_INIT([dnsperf], [2.14.0], [admin@dns-oarc.net], [dnsperf], [https://github.com/DNS-OARC/dnsperf/issues])
|
||||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
|
||||||
AC_CONFIG_SRCDIR([src/dnsperf.c])
|
AC_CONFIG_SRCDIR([src/dnsperf.c])
|
||||||
AC_CONFIG_HEADER([src/config.h])
|
AC_CONFIG_HEADER([src/config.h])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
|
|
||||||
|
# for pthread_setname_np
|
||||||
|
# needs to be called before any macros that run the C compiler
|
||||||
|
AC_GNU_SOURCE
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
@ -55,6 +59,8 @@ AM_EXTRA_RECURSIVE_TARGETS([gcov])
|
||||||
|
|
||||||
# Checks for support.
|
# Checks for support.
|
||||||
AX_PTHREAD
|
AX_PTHREAD
|
||||||
|
AC_CHECK_FUNCS([pthread_setname_np pthread_set_name_np])
|
||||||
|
AC_CHECK_HEADERS([pthread_np.h], [], [], [#include <pthread.h>])
|
||||||
AC_CHECK_LIB([m], [sqrt])
|
AC_CHECK_LIB([m], [sqrt])
|
||||||
AC_CHECK_HEADERS([stdatomic.h])
|
AC_CHECK_HEADERS([stdatomic.h])
|
||||||
AM_CONDITIONAL([HAVE_STDATOMIC], [test "x$ac_cv_header_stdatomic_h" != "xno"])
|
AM_CONDITIONAL([HAVE_STDATOMIC], [test "x$ac_cv_header_stdatomic_h" != "xno"])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" Copyright 2019-2023 OARC, Inc.
|
.\" Copyright 2019-2024 OARC, Inc.
|
||||||
.\" Copyright 2017-2018 Akamai Technologies
|
.\" Copyright 2017-2018 Akamai Technologies
|
||||||
.\" Copyright 2006-2016 Nominum, Inc.
|
.\" Copyright 2006-2016 Nominum, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
103
src/config.h.in
103
src/config.h.in
|
@ -24,15 +24,27 @@
|
||||||
/* Define to 1 if you have the `nghttp2' library (-lnghttp2). */
|
/* Define to 1 if you have the `nghttp2' library (-lnghttp2). */
|
||||||
#undef HAVE_LIBNGHTTP2
|
#undef HAVE_LIBNGHTTP2
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <minix/config.h> header file. */
|
||||||
|
#undef HAVE_MINIX_CONFIG_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <nghttp2.h> header file. */
|
/* Define to 1 if you have the <nghttp2.h> header file. */
|
||||||
#undef HAVE_NGHTTP2_H
|
#undef HAVE_NGHTTP2_H
|
||||||
|
|
||||||
/* Define if you have POSIX threads libraries and header files. */
|
/* Define if you have POSIX threads libraries and header files. */
|
||||||
#undef HAVE_PTHREAD
|
#undef HAVE_PTHREAD
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <pthread_np.h> header file. */
|
||||||
|
#undef HAVE_PTHREAD_NP_H
|
||||||
|
|
||||||
/* Have PTHREAD_PRIO_INHERIT. */
|
/* Have PTHREAD_PRIO_INHERIT. */
|
||||||
#undef HAVE_PTHREAD_PRIO_INHERIT
|
#undef HAVE_PTHREAD_PRIO_INHERIT
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pthread_setname_np' function. */
|
||||||
|
#undef HAVE_PTHREAD_SETNAME_NP
|
||||||
|
|
||||||
|
/* Define to 1 if you have the `pthread_set_name_np' function. */
|
||||||
|
#undef HAVE_PTHREAD_SET_NAME_NP
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdatomic.h> header file. */
|
/* Define to 1 if you have the <stdatomic.h> header file. */
|
||||||
#undef HAVE_STDATOMIC_H
|
#undef HAVE_STDATOMIC_H
|
||||||
|
|
||||||
|
@ -63,6 +75,9 @@
|
||||||
/* Define to 1 if you have the <unistd.h> header file. */
|
/* Define to 1 if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <wchar.h> header file. */
|
||||||
|
#undef HAVE_WCHAR_H
|
||||||
|
|
||||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||||
#undef LT_OBJDIR
|
#undef LT_OBJDIR
|
||||||
|
|
||||||
|
@ -96,6 +111,94 @@
|
||||||
backward compatibility; new code need not use it. */
|
backward compatibility; new code need not use it. */
|
||||||
#undef STDC_HEADERS
|
#undef STDC_HEADERS
|
||||||
|
|
||||||
|
/* Enable extensions on AIX 3, Interix. */
|
||||||
|
#ifndef _ALL_SOURCE
|
||||||
|
# undef _ALL_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on macOS. */
|
||||||
|
#ifndef _DARWIN_C_SOURCE
|
||||||
|
# undef _DARWIN_C_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on Solaris. */
|
||||||
|
#ifndef __EXTENSIONS__
|
||||||
|
# undef __EXTENSIONS__
|
||||||
|
#endif
|
||||||
|
/* Enable GNU extensions on systems that have them. */
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
# undef _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable X/Open compliant socket functions that do not require linking
|
||||||
|
with -lxnet on HP-UX 11.11. */
|
||||||
|
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
|
||||||
|
# undef _HPUX_ALT_XOPEN_SOCKET_API
|
||||||
|
#endif
|
||||||
|
/* Identify the host operating system as Minix.
|
||||||
|
This macro does not affect the system headers' behavior.
|
||||||
|
A future release of Autoconf may stop defining this macro. */
|
||||||
|
#ifndef _MINIX
|
||||||
|
# undef _MINIX
|
||||||
|
#endif
|
||||||
|
/* Enable general extensions on NetBSD.
|
||||||
|
Enable NetBSD compatibility extensions on Minix. */
|
||||||
|
#ifndef _NETBSD_SOURCE
|
||||||
|
# undef _NETBSD_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable OpenBSD compatibility extensions on NetBSD.
|
||||||
|
Oddly enough, this does nothing on OpenBSD. */
|
||||||
|
#ifndef _OPENBSD_SOURCE
|
||||||
|
# undef _OPENBSD_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Define to 1 if needed for POSIX-compatible behavior. */
|
||||||
|
#ifndef _POSIX_SOURCE
|
||||||
|
# undef _POSIX_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Define to 2 if needed for POSIX-compatible behavior. */
|
||||||
|
#ifndef _POSIX_1_SOURCE
|
||||||
|
# undef _POSIX_1_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable POSIX-compatible threading on Solaris. */
|
||||||
|
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
# undef _POSIX_PTHREAD_SEMANTICS
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
|
||||||
|
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||||
|
# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
|
||||||
|
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||||
|
# undef __STDC_WANT_IEC_60559_BFP_EXT__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
|
||||||
|
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||||
|
# undef __STDC_WANT_IEC_60559_DFP_EXT__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
|
||||||
|
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||||
|
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
|
||||||
|
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||||
|
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
|
||||||
|
#ifndef __STDC_WANT_LIB_EXT2__
|
||||||
|
# undef __STDC_WANT_LIB_EXT2__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions specified by ISO/IEC 24747:2009. */
|
||||||
|
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||||
|
# undef __STDC_WANT_MATH_SPEC_FUNCS__
|
||||||
|
#endif
|
||||||
|
/* Enable extensions on HP NonStop. */
|
||||||
|
#ifndef _TANDEM_SOURCE
|
||||||
|
# undef _TANDEM_SOURCE
|
||||||
|
#endif
|
||||||
|
/* Enable X/Open extensions. Define to 500 only if necessary
|
||||||
|
to make mbstate_t available. */
|
||||||
|
#ifndef _XOPEN_SOURCE
|
||||||
|
# undef _XOPEN_SOURCE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" Copyright 2019-2023 OARC, Inc.
|
.\" Copyright 2019-2024 OARC, Inc.
|
||||||
.\" Copyright 2017-2018 Akamai Technologies
|
.\" Copyright 2017-2018 Akamai Technologies
|
||||||
.\" Copyright 2006-2016 Nominum, Inc.
|
.\" Copyright 2006-2016 Nominum, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -86,7 +86,7 @@ typedef struct {
|
||||||
uint32_t bufsize;
|
uint32_t bufsize;
|
||||||
bool edns;
|
bool edns;
|
||||||
bool dnssec;
|
bool dnssec;
|
||||||
perf_tsigkey_t* tsigkey;
|
const char* tsigkey;
|
||||||
perf_ednsoption_t* edns_option;
|
perf_ednsoption_t* edns_option;
|
||||||
uint32_t max_outstanding;
|
uint32_t max_outstanding;
|
||||||
uint32_t max_qps;
|
uint32_t max_qps;
|
||||||
|
@ -129,7 +129,7 @@ typedef struct {
|
||||||
uint64_t latency_min;
|
uint64_t latency_min;
|
||||||
uint64_t latency_max;
|
uint64_t latency_max;
|
||||||
|
|
||||||
uint64_t num_conn_reconnect;
|
uint64_t num_conn_attempts;
|
||||||
uint64_t num_conn_completed;
|
uint64_t num_conn_completed;
|
||||||
|
|
||||||
uint64_t conn_latency_sum;
|
uint64_t conn_latency_sum;
|
||||||
|
@ -294,7 +294,7 @@ diff_stats(const config_t* config, stats_t* last, stats_t* now, stats_t* diff)
|
||||||
diff->latency_min = 0; /* not enough data */
|
diff->latency_min = 0; /* not enough data */
|
||||||
diff->latency_max = 0;
|
diff->latency_max = 0;
|
||||||
|
|
||||||
diff->num_conn_reconnect = now->num_conn_reconnect - last->num_conn_reconnect;
|
diff->num_conn_attempts = now->num_conn_attempts - last->num_conn_attempts;
|
||||||
diff->num_conn_completed = now->num_conn_completed - last->num_conn_completed;
|
diff->num_conn_completed = now->num_conn_completed - last->num_conn_completed;
|
||||||
|
|
||||||
diff->conn_latency_sum = now->conn_latency_sum - last->conn_latency_sum;
|
diff->conn_latency_sum = now->conn_latency_sum - last->conn_latency_sum;
|
||||||
|
@ -438,16 +438,16 @@ print_statistics(const config_t* config, const times_t* times, stats_t* stats, u
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
if (!stats->num_conn_completed && !stats->num_conn_reconnect) {
|
if (!stats->num_conn_completed && !stats->num_conn_attempts) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Connection Statistics:\n\n");
|
printf("Connection Statistics:\n\n");
|
||||||
printf(" Reconnections: %" PRIu64 " (%.2lf%% of %" PRIu64 " connections)\n\n",
|
printf(" Connection attempts: %" PRIu64 " (%" PRIu64 " successful, %.2lf%%)\n\n",
|
||||||
stats->num_conn_reconnect,
|
stats->num_conn_attempts,
|
||||||
PERF_SAFE_DIV(100.0 * stats->num_conn_reconnect, stats->num_conn_completed),
|
stats->num_conn_completed,
|
||||||
stats->num_conn_completed);
|
PERF_SAFE_DIV(100.0 * stats->num_conn_completed, stats->num_conn_attempts));
|
||||||
latency_avg = PERF_SAFE_DIV(stats->conn_latency_sum, stats->num_conn_completed);
|
latency_avg = PERF_SAFE_DIV(stats->conn_latency_sum, stats->num_conn_completed);
|
||||||
printf(" Average Latency (s): %u.%06u",
|
printf(" Average Latency (s): %u.%06u",
|
||||||
(unsigned int)(latency_avg / MILLION),
|
(unsigned int)(latency_avg / MILLION),
|
||||||
|
@ -518,7 +518,7 @@ sum_stats(const config_t* config, stats_t* total)
|
||||||
total->latency_max = stats->latency_max;
|
total->latency_max = stats->latency_max;
|
||||||
|
|
||||||
total->num_conn_completed += stats->num_conn_completed;
|
total->num_conn_completed += stats->num_conn_completed;
|
||||||
total->num_conn_reconnect += stats->num_conn_reconnect;
|
total->num_conn_attempts += stats->num_conn_attempts;
|
||||||
|
|
||||||
total->conn_latency_sum += stats->conn_latency_sum;
|
total->conn_latency_sum += stats->conn_latency_sum;
|
||||||
total->conn_latency_sum_squares += stats->conn_latency_sum_squares;
|
total->conn_latency_sum_squares += stats->conn_latency_sum_squares;
|
||||||
|
@ -582,7 +582,6 @@ setup(int argc, char** argv, config_t* config)
|
||||||
in_port_t local_port = DEFAULT_LOCAL_PORT;
|
in_port_t local_port = DEFAULT_LOCAL_PORT;
|
||||||
const char* filename = NULL;
|
const char* filename = NULL;
|
||||||
const char* edns_option = NULL;
|
const char* edns_option = NULL;
|
||||||
const char* tsigkey = NULL;
|
|
||||||
const char* mode = 0;
|
const char* mode = 0;
|
||||||
const char* doh_uri = DEFAULT_DOH_URI;
|
const char* doh_uri = DEFAULT_DOH_URI;
|
||||||
const char* doh_method = DEFAULT_DOH_METHOD;
|
const char* doh_method = DEFAULT_DOH_METHOD;
|
||||||
|
@ -646,7 +645,7 @@ setup(int argc, char** argv, config_t* config)
|
||||||
&config->dnssec);
|
&config->dnssec);
|
||||||
perf_opt_add('y', perf_opt_string, "[alg:]name:secret",
|
perf_opt_add('y', perf_opt_string, "[alg:]name:secret",
|
||||||
"the TSIG algorithm, name and secret (base64)", NULL,
|
"the TSIG algorithm, name and secret (base64)", NULL,
|
||||||
&tsigkey);
|
&config->tsigkey);
|
||||||
perf_opt_add('q', perf_opt_uint, "num_queries",
|
perf_opt_add('q', perf_opt_uint, "num_queries",
|
||||||
"the maximum number of queries outstanding",
|
"the maximum number of queries outstanding",
|
||||||
stringify(DEFAULT_MAX_OUTSTANDING),
|
stringify(DEFAULT_MAX_OUTSTANDING),
|
||||||
|
@ -753,8 +752,11 @@ setup(int argc, char** argv, config_t* config)
|
||||||
if (config->dnssec || edns_option != NULL)
|
if (config->dnssec || edns_option != NULL)
|
||||||
config->edns = true;
|
config->edns = true;
|
||||||
|
|
||||||
if (tsigkey != NULL)
|
if (config->tsigkey) {
|
||||||
config->tsigkey = perf_tsig_parsekey(tsigkey);
|
// check TSIG key to die earlier than in threads
|
||||||
|
perf_tsigkey_t* k = perf_tsig_parsekey(config->tsigkey);
|
||||||
|
perf_tsig_destroykey(&k);
|
||||||
|
}
|
||||||
|
|
||||||
if (edns_option != NULL)
|
if (edns_option != NULL)
|
||||||
config->edns_option = perf_edns_parseoption(edns_option);
|
config->edns_option = perf_edns_parseoption(edns_option);
|
||||||
|
@ -802,8 +804,6 @@ cleanup(config_t* config)
|
||||||
close(mainpipe[i]);
|
close(mainpipe[i]);
|
||||||
close(intrpipe[i]);
|
close(intrpipe[i]);
|
||||||
}
|
}
|
||||||
if (config->tsigkey != NULL)
|
|
||||||
perf_tsig_destroykey(&config->tsigkey);
|
|
||||||
if (config->edns_option != NULL)
|
if (config->edns_option != NULL)
|
||||||
perf_edns_destroyoption(&config->edns_option);
|
perf_edns_destroyoption(&config->edns_option);
|
||||||
}
|
}
|
||||||
|
@ -909,6 +909,7 @@ do_send(void* arg)
|
||||||
perf_result_t result;
|
perf_result_t result;
|
||||||
bool all_fail;
|
bool all_fail;
|
||||||
unsigned char socketbits[(MAX_SOCKETS / 8) + 1] = {};
|
unsigned char socketbits[(MAX_SOCKETS / 8) + 1] = {};
|
||||||
|
perf_tsigkey_t* tsigkey = 0;
|
||||||
|
|
||||||
tinfo = (threadinfo_t*)arg;
|
tinfo = (threadinfo_t*)arg;
|
||||||
config = tinfo->config;
|
config = tinfo->config;
|
||||||
|
@ -917,6 +918,9 @@ do_send(void* arg)
|
||||||
max_packet_size = config->edns ? MAX_EDNS_PACKET : MAX_UDP_PACKET;
|
max_packet_size = config->edns ? MAX_EDNS_PACKET : MAX_UDP_PACKET;
|
||||||
perf_buffer_init(&msg, packet_buffer, max_packet_size);
|
perf_buffer_init(&msg, packet_buffer, max_packet_size);
|
||||||
perf_buffer_init(&lines, input_data, sizeof(input_data));
|
perf_buffer_init(&lines, input_data, sizeof(input_data));
|
||||||
|
if (config->tsigkey) {
|
||||||
|
tsigkey = perf_tsig_parsekey(config->tsigkey);
|
||||||
|
}
|
||||||
|
|
||||||
if (tinfo->max_qps > 0) {
|
if (tinfo->max_qps > 0) {
|
||||||
q_step = MILLION / tinfo->max_qps;
|
q_step = MILLION / tinfo->max_qps;
|
||||||
|
@ -1072,7 +1076,7 @@ do_send(void* arg)
|
||||||
perf_buffer_usedregion(&lines, &used);
|
perf_buffer_usedregion(&lines, &used);
|
||||||
result = perf_dns_buildrequest(&used, qid,
|
result = perf_dns_buildrequest(&used, qid,
|
||||||
config->edns, config->dnssec, config->input_format == input_format_text_update,
|
config->edns, config->dnssec, config->input_format == input_format_text_update,
|
||||||
config->tsigkey, config->edns_option,
|
tsigkey, config->edns_option,
|
||||||
&msg);
|
&msg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -1156,6 +1160,10 @@ do_send(void* arg)
|
||||||
tinfo->done_sending = true;
|
tinfo->done_sending = true;
|
||||||
if (write(mainpipe[1], "", 1)) { // lgtm [cpp/empty-block]
|
if (write(mainpipe[1], "", 1)) { // lgtm [cpp/empty-block]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tsigkey) {
|
||||||
|
perf_tsig_destroykey(&tsigkey);
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1502,7 +1510,8 @@ static void perf__net_event(struct perf_net_socket* sock, perf_socket_event_t ev
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case perf_socket_event_reconnecting:
|
case perf_socket_event_reconnecting:
|
||||||
stats->num_conn_reconnect++;
|
case perf_socket_event_connecting:
|
||||||
|
stats->num_conn_attempts++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1512,7 +1521,7 @@ static void perf__net_event(struct perf_net_socket* sock, perf_socket_event_t ev
|
||||||
|
|
||||||
static void
|
static void
|
||||||
threadinfo_init(threadinfo_t* tinfo, const config_t* config,
|
threadinfo_init(threadinfo_t* tinfo, const config_t* config,
|
||||||
const times_t* times)
|
const times_t* times, int idx)
|
||||||
{
|
{
|
||||||
unsigned int offset, socket_offset, i;
|
unsigned int offset, socket_offset, i;
|
||||||
|
|
||||||
|
@ -1581,8 +1590,13 @@ threadinfo_init(threadinfo_t* tinfo, const config_t* config,
|
||||||
}
|
}
|
||||||
tinfo->current_sock = 0;
|
tinfo->current_sock = 0;
|
||||||
|
|
||||||
|
char name[16]; // glibc is limited to 16 characters
|
||||||
PERF_THREAD(&tinfo->receiver, do_recv, tinfo);
|
PERF_THREAD(&tinfo->receiver, do_recv, tinfo);
|
||||||
|
snprintf(name, sizeof(name), "perf-recv-%04d", idx);
|
||||||
|
perf_os_thread_setname(tinfo->receiver, name);
|
||||||
PERF_THREAD(&tinfo->sender, do_send, tinfo);
|
PERF_THREAD(&tinfo->sender, do_send, tinfo);
|
||||||
|
snprintf(name, sizeof(name), "perf-send-%04d", idx);
|
||||||
|
perf_os_thread_setname(tinfo->sender, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1652,7 +1666,7 @@ int main(int argc, char** argv)
|
||||||
perf_log_fatal("out of memory");
|
perf_log_fatal("out of memory");
|
||||||
}
|
}
|
||||||
for (i = 0; i < config.threads; i++)
|
for (i = 0; i < config.threads; i++)
|
||||||
threadinfo_init(&threads[i], &config, ×);
|
threadinfo_init(&threads[i], &config, ×, i);
|
||||||
if (config.stats_interval > 0) {
|
if (config.stats_interval > 0) {
|
||||||
stats_thread.config = &config;
|
stats_thread.config = &config;
|
||||||
stats_thread.times = ×
|
stats_thread.times = ×
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
26
src/os.c
26
src/os.c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -32,6 +32,10 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
|
|
||||||
|
#if defined(HAVE_PTHREAD_NP_H)
|
||||||
|
#include <pthread_np.h>
|
||||||
|
#endif /* if defined(HAVE_PTHREAD_NP_H) */
|
||||||
|
|
||||||
void perf_os_blocksignal(int sig, bool block)
|
void perf_os_blocksignal(int sig, bool block)
|
||||||
{
|
{
|
||||||
sigset_t sset;
|
sigset_t sset;
|
||||||
|
@ -149,3 +153,23 @@ perf_os_waituntilanywritable(struct perf_net_socket** socks, unsigned int nfds,
|
||||||
return (PERF_R_SUCCESS);
|
return (PERF_R_SUCCESS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void perf_os_thread_setname(pthread_t thread, const char* name)
|
||||||
|
{
|
||||||
|
#if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__APPLE__)
|
||||||
|
/*
|
||||||
|
* macOS has pthread_setname_np but only works on the
|
||||||
|
* current thread so it's not used here
|
||||||
|
*/
|
||||||
|
#if defined(__NetBSD__)
|
||||||
|
(void)pthread_setname_np(thread, name, NULL);
|
||||||
|
#else /* if defined(__NetBSD__) */
|
||||||
|
(void)pthread_setname_np(thread, name);
|
||||||
|
#endif /* if defined(__NetBSD__) */
|
||||||
|
#elif defined(HAVE_PTHREAD_SET_NAME_NP)
|
||||||
|
(void)pthread_set_name_np(thread, name);
|
||||||
|
#else /* if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__APPLE__) */
|
||||||
|
(void)(thread);
|
||||||
|
(void)(name);
|
||||||
|
#endif /* if defined(HAVE_PTHREAD_SETNAME_NP) && !defined(__APPLE__) */
|
||||||
|
}
|
||||||
|
|
5
src/os.h
5
src/os.h
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <pthread.h>
|
||||||
|
|
||||||
void perf_os_blocksignal(int sig, bool block);
|
void perf_os_blocksignal(int sig, bool block);
|
||||||
|
|
||||||
|
@ -41,4 +42,6 @@ perf_result_t
|
||||||
perf_os_waituntilanywritable(struct perf_net_socket** socks, unsigned int nfds, int pipe_fd,
|
perf_os_waituntilanywritable(struct perf_net_socket** socks, unsigned int nfds, int pipe_fd,
|
||||||
int64_t timeout);
|
int64_t timeout);
|
||||||
|
|
||||||
|
void perf_os_thread_setname(pthread_t thread, const char* name);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright 2019-2023 OARC, Inc.
|
# Copyright 2019-2024 OARC, Inc.
|
||||||
# Copyright 2017-2018 Akamai Technologies
|
# Copyright 2017-2018 Akamai Technologies
|
||||||
# Copyright 2006-2016 Nominum, Inc.
|
# Copyright 2006-2016 Nominum, Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" Copyright 2019-2023 OARC, Inc.
|
.\" Copyright 2019-2024 OARC, Inc.
|
||||||
.\" Copyright 2017-2018 Akamai Technologies
|
.\" Copyright 2017-2018 Akamai Technologies
|
||||||
.\" Copyright 2006-2016 Nominum, Inc.
|
.\" Copyright 2006-2016 Nominum, Inc.
|
||||||
.\" All rights reserved.
|
.\" All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -149,7 +149,8 @@ static uint64_t num_queries_outstanding;
|
||||||
static uint64_t num_responses_received;
|
static uint64_t num_responses_received;
|
||||||
static uint64_t num_queries_timed_out;
|
static uint64_t num_queries_timed_out;
|
||||||
static uint64_t rcodecounts[16];
|
static uint64_t rcodecounts[16];
|
||||||
static uint64_t num_reconnections;
|
static uint64_t num_conn_completed;
|
||||||
|
static uint64_t num_conn_attempts;
|
||||||
|
|
||||||
static uint64_t time_now;
|
static uint64_t time_now;
|
||||||
static uint64_t time_of_program_start;
|
static uint64_t time_of_program_start;
|
||||||
|
@ -489,10 +490,12 @@ static void perf__net_event(struct perf_net_socket* sock, perf_socket_event_t ev
|
||||||
case perf_socket_event_connected:
|
case perf_socket_event_connected:
|
||||||
b->connections++;
|
b->connections++;
|
||||||
b->conn_latency_sum += elapsed_time / (double)MILLION;
|
b->conn_latency_sum += elapsed_time / (double)MILLION;
|
||||||
|
num_conn_completed++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case perf_socket_event_reconnecting:
|
case perf_socket_event_reconnecting:
|
||||||
num_reconnections++;
|
case perf_socket_event_connecting:
|
||||||
|
num_conn_attempts++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -545,8 +548,7 @@ print_statistics(void)
|
||||||
perf_dns_rcode_strings[i], rcodecounts[i],
|
perf_dns_rcode_strings[i], rcodecounts[i],
|
||||||
(rcodecounts[i] * 100.0) / num_responses_received);
|
(rcodecounts[i] * 100.0) / num_responses_received);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n\n");
|
||||||
printf(" Reconnection(s): %" PRIu64 "\n", num_reconnections);
|
|
||||||
printf(" Run time (s): %u.%06u\n",
|
printf(" Run time (s): %u.%06u\n",
|
||||||
(unsigned int)(run_time / MILLION),
|
(unsigned int)(run_time / MILLION),
|
||||||
(unsigned int)(run_time % MILLION));
|
(unsigned int)(run_time % MILLION));
|
||||||
|
@ -569,6 +571,10 @@ print_statistics(void)
|
||||||
printf(" Maximum throughput: %.6lf qps\n", max_throughput);
|
printf(" Maximum throughput: %.6lf qps\n", max_throughput);
|
||||||
printf(" Lost at that point: %.2f%%\n", loss_at_max_throughput);
|
printf(" Lost at that point: %.2f%%\n", loss_at_max_throughput);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
printf(" Connection attempts: %" PRIu64 " (%" PRIu64 " successful, %.2lf%%)\n\n",
|
||||||
|
num_conn_attempts,
|
||||||
|
num_conn_completed,
|
||||||
|
PERF_SAFE_DIV(100.0 * num_conn_completed, num_conn_attempts));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2019-2023 OARC, Inc.
|
* Copyright 2019-2024 OARC, Inc.
|
||||||
* Copyright 2017-2018 Akamai Technologies
|
* Copyright 2017-2018 Akamai Technologies
|
||||||
* Copyright 2006-2016 Nominum, Inc.
|
* Copyright 2006-2016 Nominum, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
|
Loading…
Add table
Reference in a new issue