aboutsummaryrefslogtreecommitdiff
path: root/src/tools/perf/perf.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-23 07:39:59 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-23 07:39:59 -0700
commit01817988f4631bdd8ee5cec9c6b69039712a93fe (patch)
treec8c4259671fbb586a466a8c5d623fc8c183f8927 /src/tools/perf/perf.c
parentff00eac2401732e9efb6170ffb90100dcf6332a7 (diff)
downloadnng-01817988f4631bdd8ee5cec9c6b69039712a93fe.tar.gz
nng-01817988f4631bdd8ee5cec9c6b69039712a93fe.tar.bz2
nng-01817988f4631bdd8ee5cec9c6b69039712a93fe.zip
Move the rest of the functionality from platform.h into core.
This also deprecates supplemental/util/platform.h.
Diffstat (limited to 'src/tools/perf/perf.c')
-rw-r--r--src/tools/perf/perf.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/tools/perf/perf.c b/src/tools/perf/perf.c
index 46d91cd8..2801ce51 100644
--- a/src/tools/perf/perf.c
+++ b/src/tools/perf/perf.c
@@ -1,5 +1,5 @@
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
//
// This software is supplied under the terms of the MIT License, a
@@ -17,7 +17,6 @@
#include <nng/nng.h>
#include <nng/supplemental/util/options.h>
-#include <nng/supplemental/util/platform.h>
static void die(const char *, ...);
static int
@@ -328,13 +327,13 @@ do_inproc(void *args)
void
do_inproc_lat(int argc, char **argv)
{
- nng_thread * thr;
+ nng_thread *thr;
struct inproc_args ia;
int rv;
int val;
int optidx;
- char * arg;
- char * addr;
+ char *arg;
+ char *addr;
addr = "inproc://latency_test";
@@ -392,13 +391,13 @@ do_inproc_lat(int argc, char **argv)
void
do_inproc_thr(int argc, char **argv)
{
- nng_thread * thr;
+ nng_thread *thr;
struct inproc_args ia;
int rv;
int optidx;
int val;
- char * arg;
- char * addr = "inproc://throughput-test";
+ char *arg;
+ char *addr = "inproc://throughput-test";
optidx = 0;
while ((rv = nng_opts_parse(argc, argv, opts, &val, &arg, &optidx)) ==
@@ -461,7 +460,7 @@ void
latency_client(const char *addr, size_t msgsize, int trips)
{
nng_socket s;
- nng_msg * msg;
+ nng_msg *msg;
nng_time start, end;
int rv;
int i;
@@ -511,7 +510,7 @@ void
latency_server(const char *addr, size_t msgsize, int trips)
{
nng_socket s;
- nng_msg * msg;
+ nng_msg *msg;
int rv;
int i;
@@ -553,7 +552,7 @@ void
throughput_server(const char *addr, size_t msgsize, int count)
{
nng_socket s;
- nng_msg * msg;
+ nng_msg *msg;
int rv;
int i;
uint64_t start, end;
@@ -611,7 +610,7 @@ void
throughput_client(const char *addr, size_t msgsize, int count)
{
nng_socket s;
- nng_msg * msg;
+ nng_msg *msg;
int rv;
int i;