def add_queue_datapoints(self, queue_data):
        """Add per-queue datapoints to the processing stack.

        :param list queue_data: The raw queue data list

        """
        count = 0
        available, consumers, deliver, publish, redeliver, unacked = \
            0, 0, 0, 0, 0, 0
        for count, queue in enumerate(queue_data):
            if queue['name'][0:7] == 'amq.gen':
                LOGGER.debug('Skipping auto-named queue: %s', queue['name'])
                continue

            message_stats = queue.get('message_stats', dict())
            if not message_stats:
                message_stats = self.DUMMY_STATS

            vhost = 'Default' if queue['vhost'] == '/' else queue['vhost']
            base_name = 'Queue/%s/%s' % (vhost, queue['name'])

            if not self.track_vhost_queue(vhost, queue['name']):
                continue

            self.add_gauge_value('%s/Consumers' % base_name, 'consumers',
                                 queue.get('consumers', 0))

            base_name = 'Queue/%s/%s/Messages' % (vhost, queue['name'])
            self.add_derive_value('%s/Acknowledged' % base_name, 'messages',
                                  message_stats.get('ack', 0))
            self.add_derive_value('%s/Delivered (All)' % base_name, 'messages',
                                  message_stats.get('deliver_get', 0))
            self.add_derive_value('%s/Delivered' % base_name, 'messages',
                                  message_stats.get('deliver', 0))
            self.add_derive_value('%s/Delivered No-Ack' % base_name, 'messages',
                                  message_stats.get('deliver_no_ack', 0))
            self.add_derive_value('%s/Get' % base_name, 'messages',
                                  message_stats.get('get', 0))
            self.add_derive_value('%s/Get No-Ack' % base_name, 'messages',
                                  message_stats.get('get_no_ack', 0))
            self.add_derive_value('%s/Published' % base_name, 'messages',
                                  message_stats.get('publish', 0))
            self.add_derive_value(base_name % '%s/Redelivered', 'messages',
                                  message_stats.get('redeliver', 0))

            self.add_gauge_value('%s Available' % base_name, 'messages',
                                 queue.get('messages_ready', 0))
            self.add_gauge_value('%s Unacknowledged' % base_name, 'messages',
                                 queue.get('messages_unacknowledged', 0))

            available += queue.get('messages_ready', 0)
            deliver += message_stats.get('deliver_get', 0)
            publish += message_stats.get('publish', 0)
            redeliver += message_stats.get('redeliver', 0)
            unacked += queue.get('messages_unacknowledged', 0)

        # Summary stats
        self.add_derive_value('Summary/Messages/Delivered', 'messages',
                              deliver, count=count)
        self.add_derive_value('Summary/Messages/Published', 'messages',
                              publish, count=count)
        self.add_derive_value('Summary/Messages/Redelivered', 'messages',
                              redeliver, count=count)

        self.add_gauge_value('Summary/Messages Available', 'messages',
                             available, count=count)
        self.add_gauge_value('Summary/Messages Unacknowledged', 'messages',
                             unacked, count=count)
dataset/ETHPy150Open MeetMe/newrelic-plugin-agent/newrelic_plugin_agent/plugins/rabbitmq.py/RabbitMQ.add_queue_datapoints/swapped operands of `%`