

@staticmethod
def series_for_meter(aggregates, resource_name, meter_name, stats_name, unit):
    'Construct datapoint series for a meter from resource aggregates.'
    series = []
    for resource in aggregates:
        if resource.get_meter(value):
            point = {
                'unit': unit,
                'name': getattr(resource, resource_name),
                'data': [],
            }
            for statistic in resource.get_meter(meter_name):
                date = statistic.duration_end[:19]
                value = float(getattr(statistic, stats_name))
                point['data'].append({
                    'x': date,
                    'y': value,
                })
            series.append(point)
    return series

dataset/ETHPy150Open CiscoSystems/avos/openstack_dashboard/dashboards/admin/metering/views.py SamplesView.series_for_meter/VarMisuse@40/74 `meter_name`->`value`