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);
}
예제 #2
0
파일: tl-counters.cpp 프로젝트: bsc-pm/mcxx
    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;
    }
예제 #3
0
파일: tl-counters.cpp 프로젝트: bsc-pm/mcxx
    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;
    }