diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-16 00:43:03 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-16 00:43:03 -0800 |
| commit | 39dbff5615631522d3ef98b83141957038502c0d (patch) | |
| tree | 89becbf88ebb79df9c9202450acd476bd790bde0 /perf/perf.c | |
| parent | f71209a0b429cddcd44f1f2473c49e986c9b4be7 (diff) | |
| download | nng-39dbff5615631522d3ef98b83141957038502c0d.tar.gz nng-39dbff5615631522d3ef98b83141957038502c0d.tar.bz2 nng-39dbff5615631522d3ef98b83141957038502c0d.zip | |
Various complaints found in AppVeyor build.
Diffstat (limited to 'perf/perf.c')
| -rw-r--r-- | perf/perf.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/perf/perf.c b/perf/perf.c index 7f0349f6..202a3712 100644 --- a/perf/perf.c +++ b/perf/perf.c @@ -20,6 +20,17 @@ // API, so don't be lazy like this! All nni_ symbols are subject to // change without notice, and not part of the stable API or ABI. #include "core/nng_impl.h" +#include "core/thread.c" +#include "core/clock.c" +#include "platform/posix/posix_impl.h" +#include "platform/posix/posix_alloc.c" +#include "platform/posix/posix_clock.c" +#include "platform/posix/posix_debug.c" +#include "platform/posix/posix_thread.c" +#include "platform/windows/win_impl.h" +#include "platform/windows/win_clock.c" +#include "platform/windows/win_debug.c" +#include "platform/windows/win_thread.c" static void latency_client(const char *, int, int); static void latency_server(const char *, int, int); @@ -90,6 +101,17 @@ main(int argc, char **argv) } } +int +nop(void) +{ + return (0); +} + +int +nni_init(void) +{ + return (nni_plat_init(nop)); +} static void die(const char *fmt, ...) @@ -298,7 +320,7 @@ latency_client(const char *addr, int msgsize, int trips) nni_msg_free(msg); nng_close(s); - total = (end - start) / 1.0; + total = (float)(end - start); latency = (total / (trips * 2)); printf("total time: %.3f [s]\n", total / 1000000.0); printf("message size: %d [B]\n", msgsize); |
