Streamline MonitoringHub and Sink implementations
-
RootHistogramSink
: avoid having a 'registry' for each instance, instead keep one shared constant global one in an anonymous namespace (so it is hidden from the linker) -
JSONSink
: use the fact thatofstream
closes the corresponding file when going out of scope -
BaseSink
: usestd::set
with dedicted comparison operator instead ofstd::map
which should save a bit of memory -
MonitoringHub
: avoid one level of indirection in the type erasure which will allow the arguments to the type-erased functions to be passed in registers instead of forcing them to be passed through main memory -
MonitoringHub
:m_typeIndex
is an invariant once constructed, and does not need a type-erased function to be determined 'on the fly'
Edited by Gerhard Raven