Template Function pal_statistics::getOrCreateRegistry(const NodeT&, const std::string&, const std::string&)

Function Documentation

template<typename NodeT>
std::shared_ptr<StatisticsRegistry> pal_statistics::getOrCreateRegistry(const NodeT &node, const std::string &topic, const std::string &custom_key)

Creates the registry for the given node and topic and stores it in the global registry map using the key, if it doesn’t exist. If it already exists, it returns the existing one.

Parameters:
  • node – - The node to create the registry

  • topic – - The topic to publish the statistics

  • key – - The key to store the registry in the global registry map

Returns:

std::shared_ptr<StatisticsRegistry> - The registry stored in the global registry map using the key