def send_stats(when, stats, sender, to): for (plugin_type, plugin_inst), values in stats.items(): if not values: continue collectd.PLUGIN_TYPE = plugin_type for message in collectd.messages(values, when, sender, plugin_inst): collectd.sock.sendto(message, to)
def assertValidMessages(self, expected_message_count, stats): packets = collectd.messages(stats) self.assertEqual(expected_message_count, len(packets)) for packet in packets: self.assertValidPacket(7, packet)
def assertValidMessages(self, expected_message_count, stats): packets = collectd.messages(stats) self.assertEqual(expected_message_count, len(packets)) for packet in packets: self.assertValidPacket(8, packet)