def add_flavor_hours(self, flavor, flavor_name, unit_hours):
        if flavor not in self.by_flavor:
            self.by_flavor[flavor] = dict(count=0, unit_hours=0.0)
        cts = self.by_flavor[flavor]
        cts['count'] += 1
        cts['unit_hours'] += unit_hours
        cts['percent_count'] = (float(cts['count'])/self.count) * 100
        cts['percent_unit_hours'] = (cts['unit_hours']/self.unit_hours) * 100
        cts['flavor_name'] = flavor_name
dataset/ETHPy150Open openstack/stacktach/reports/instance_hours.py/InstanceHoursReport.add_flavor_hours/original