def METHOD_NAME(self, utcnow):
    metric_name = "test_counter"
    metric_key = metric_name + "|c"
    utcnow.return_value = utils.datetime_utc(2015, 1, 7, 13, 58, 36)
    self.server.datagram_received(
        ("%s:1|c" % metric_name).encode('ascii'),
        ("127.0.0.1", 12345))
    self.stats.flush()
    r = self.stats.indexer.get_resource('generic',
                                        self.conf.statsd.resource_id,
                                        with_metrics=True)
    metric = r.get_metric(metric_key)
    self.assertIsNotNone(metric)
    self.trigger_processing([metric])
    measures = self.storage.get_aggregated_measures(
        {metric: self.aggregations})[metric]
    measures = get_measures_list(measures)
    self.assertEqual({"mean": [
        (datetime64(2015, 1, 7), numpy.timedelta64(1, 'D'), 1.0),
        (datetime64(2015, 1, 7, 13), numpy.timedelta64(1, 'h'), 1.0),
        (datetime64(2015, 1, 7, 13, 58), numpy.timedelta64(1, 'm'), 1.0)
    ]}, measures)
    utcnow.return_value = utils.datetime_utc(2015, 1, 7, 13, 59, 37)
    self.server.datagram_received(
        ("%s:45|c" % metric_name).encode('ascii'),
        ("127.0.0.1", 12345))
    self.server.datagram_received(
        ("%s:2|c|@0.2" % metric_name).encode('ascii'),
        ("127.0.0.1", 12345))
    self.stats.flush()
    self.trigger_processing([metric])
    measures = self.storage.get_aggregated_measures(
        {metric: self.aggregations})[metric]
    measures = get_measures_list(measures)
    self.assertEqual({"mean": [
        (datetime64(2015, 1, 7), numpy.timedelta64(1, 'D'), 28),
        (datetime64(2015, 1, 7, 13), numpy.timedelta64(1, 'h'), 28),
        (datetime64(2015, 1, 7, 13, 58), numpy.timedelta64(1, 'm'), 1.0),
        (datetime64(2015, 1, 7, 13, 59), numpy.timedelta64(1, 'm'), 55.0)
    ]}, measures)