From 16c28db384adbe61034eb8a2267cd6a886ffd72f Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Thu, 1 Dec 2016 21:42:51 +0100 Subject: Added the client side code for the statsd in the nodes. --- node/node.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'node/node.hpp') diff --git a/node/node.hpp b/node/node.hpp index 3233ba2..1aad503 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -4,6 +4,7 @@ #include "receiver.hpp" #include "senderreceiver.hpp" #include "sender.hpp" +#include "performanceclient.hpp" #include "api.h" #include "cmix.h" @@ -12,6 +13,7 @@ #include #include +#include #include #include @@ -50,6 +52,16 @@ struct NodeNetworkSettings { unsigned int minimum_nr_messages; ///< The minimum number of available messages before starting to run a mix; }; +/*! + * \brief Details if and where to send performance data. + */ +struct PerformanceSettings { + bool run; + std::string host; + std::string port; + std::string name; +}; + template struct ArenaMessage { google::protobuf::Arena arena; @@ -76,6 +88,8 @@ class Node typedef std::list Purgatory; Purgatory purgatory; + boost::optional performance; + typedef std::map ClientConnections; ClientConnections clients; typedef std::map ClientData; @@ -128,7 +142,7 @@ public: * \param listen_settings The listen settings for the accepter. * \param network_settings The network settings containing if we are first and who is the next node. */ - Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings); + Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings, PerformanceSettings performance_settings); ~Node(); /*! -- cgit v1.2.3-70-g09d2