diff options
Diffstat (limited to 'node/node.hpp')
| -rw-r--r-- | node/node.hpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/node/node.hpp b/node/node.hpp index d9e16d4..335a264 100644 --- a/node/node.hpp +++ b/node/node.hpp @@ -56,16 +56,26 @@ struct NodeNetworkSettings { * \brief Details if and where to send performance data. */ struct PerformanceSettings { - bool run; - std::string host; - std::string port; - std::string name; + bool run; ///< bool indicating if we should even run performance tasks. + std::string host; ///< host at which a statsd runs. + std::string port; ///< port on which a statsd runs. + std::string name; ///< our identifier for the statsd. }; +/*! + * \brief some boilerplate to optimize some of the google protobuf memory allocations. + */ template <typename T> struct ArenaMessage { + /*! + * \brief arena The arena allocater provided by protobuf. + */ google::protobuf::Arena arena; + /*! + * \brief get Create a new object in the arena and create a ref. + * \return a new ref to a T. + */ T& get() { return *google::protobuf::Arena::CreateMessage<T>(&arena); } @@ -143,6 +153,7 @@ public: * \brief Node * \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. + * \param performance_settings The connections settings for a statsd. */ Node(ListenSettings const& listen_settings, NodeNetworkSettings network_settings, PerformanceSettings performance_settings); ~Node(); |
