diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-08-22 08:56:53 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-09-03 22:57:23 -0400 |
| commit | d83b96faeb02d7a3574e63880141d6b23f31ced1 (patch) | |
| tree | b6cd2feca3513dccba012b9da2ac230e94d09ac0 /CMakeLists.txt | |
| parent | 1b2a93503e0ed108f7c4add4bcf4b201a363bb80 (diff) | |
| download | nng-d83b96faeb02d7a3574e63880141d6b23f31ced1.tar.gz nng-d83b96faeb02d7a3574e63880141d6b23f31ced1.tar.bz2 nng-d83b96faeb02d7a3574e63880141d6b23f31ced1.zip | |
fixes #4 Statistics support
This introduces new public APIs for obtaining statistics,
and adds some generic stats for dialers, listeners, pipes, and
sockets. Also added are stats for inproc and pairv1 protocol.
The other protocols and transports will have stats added
incrementally as time goes on.
A simple test program, and man pages are provided for this.
Start by looking at nng_stat(5).
Statistics does have some impact, and they can be disabled by
using the advanced NNG_ENABLE_STATS (setting it to OFF, it's
ON by default) if you need to build a minimized configuration.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ee05c64b..3042be38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,12 @@ if (NNG_ENABLE_HTTP) endif() mark_as_advanced(NNG_ENABLE_HTTP) +option (NNG_ENABLE_STATS "Enable statistics" ON) +if (NNG_ENABLE_STATS) + add_definitions(-DNNG_ENABLE_STATS) +endif() +mark_as_advanced(NNG_ENABLE_STATS) + option (NNG_PROTO_BUS0 "Enable BUSv0 protocol." ON) if (NNG_PROTO_BUS0) add_definitions (-DNNG_HAVE_BUS0) @@ -363,10 +369,10 @@ elseif (CMAKE_SYSTEM_NAME MATCHES "Windows") elseif (CMAKE_SYSTEM_NAME MATCHES "QNX") add_definitions (-DNNG_PLATFORM_POSIX) - add_definitions (-D__EXT_BSD) + add_definitions (-D__EXT_BSD) add_definitions (-D_QNX_SOURCE) add_definitions (-DNNG_PLATFORM_QNX) - set(NNG_PLATFORM_POSIX ON) + set(NNG_PLATFORM_POSIX ON) else () message (AUTHOR_WARNING "WARNING: This platform may not be supported: ${CMAKE_SYSTEM_NAME}") |
