void ScheduledReporter::report() {
    CounterMap counter_map(metric_registry_->getCounters());
    HistogramMap histogram_map(metric_registry_->getHistograms());
    MeteredMap meter_map(metric_registry_->getMeters());
    TimerMap timer_map(metric_registry_->getTimers());
    GaugeMap gauge_map(metric_registry_->getGauges());
    report(counter_map, histogram_map, meter_map, timer_map, gauge_map);
}
Ejemplo n.º 2
0
    ObjectList<std::string> CounterManager::counters()
    {
        ObjectList<std::string> result;
        if (_counter_map == NULL)
            return result;

        counter_map_t& counter_map(*_counter_map);

        std::transform(counter_map.begin(), counter_map.end(), 
                std::back_inserter(result), get_first);

        return result;
    }
Ejemplo n.º 3
0
    Counter& CounterManager::get_counter(const std::string& str)
    {
        if (_counter_map == NULL)
        {
            _counter_map = new counter_map_t();
        }

        counter_map_t& counter_map(*_counter_map);
        Counter* p_counter = counter_map[str];
        if (p_counter == NULL)
        {
            p_counter = counter_map[str] = new Counter();
        }

        return *p_counter;
    }