def collect(self):
        def get_or_add(key, new=0, d=self.hourly):
            value = d.get(key)
            if value is None:
                value = TimeSeries(60, new)
                d[key] = value
            return value
        
        for k, v in stats.get_gauge_stats().items():
            get_or_add("gauge:%s" % k).add(v)
        
        for k, v in self.stats.get_counter_stats(reset=True).items():
            get_or_add("counter:%s" % k).add(v)
        
        for k, v in self.stats.get_timing_stats(reset=True).items():
            get_or_add("timing:%s" % k, None, d=self.hourly_timings).add(v)
        
        self.last_collection = time.time()
dataset/ETHPy150Open wadey/python-ostrich/ostrich/time_series_collector.py/TimeSeriesCollector.collect/original