Class base_manager

Inheritance Relationships

Derived Types

Class Documentation

class base_manager

Base class for managing metrics collected from variable sources across all possible collector output modes and sinks.

Subclassed by rcppsw::metrics::fs_output_manager, rcppsw::metrics::network_output_manager

Public Functions

base_manager(void) = default
virtual ~base_manager(void) = default
template<typename T>
inline void collect(const std::string &scoped_name, const T &collectee)

Decorator around collector_group::collect().

template<typename T>
inline void collect_if(const std::string &scoped_name, const T &collectee, const std::function<bool(const rmetrics::base_metrics&)> &pred)

Decorator around collector_group::collect_if().

virtual void collector_preregister(const std::string &scoped_name, const rmetrics::output_mode &mode) = 0

To be called before collector_register(), in order to correctly set up the collector map for the collector with the specified scoped name.

If you forget to do this you will get a segfault.

template<typename TCollector, typename ...Args>
inline bool collector_register(const std::string &scoped_name, Args&&... args)

Decorator around collector_group::collector_register().

inline bool collector_unregister(const std::string &scoped_name)

Decorator around collector_group::collector_unregister().

virtual void finalize(void) = 0

Decorator around collector_group::finalize_all().

virtual bool flush(const rmetrics::output_mode &mode, const rtypes::timestep &t) = 0
template<typename T = base_collector>
inline T *get(const std::string &key)

Decorator around collector_group::get().

virtual void initialize(void) = 0

Decorator around collector_group::initialize().

virtual void interval_reset(const rtypes::timestep &t) = 0

Decorator around collector_group::interval_reset().

Protected Types

using collector_map_type = std::map<std::string, rmetrics::collector_group*>

Maps the scoped name of the collector to the collector_group it belongs in.

Protected Functions

inline collector_map_type *collector_map(void)