def collect_network_io(self, whitelist=[]):
        stats = psutil.network_io_counters(pernic=True)
        for entry, stat in stats.iteritems():
            if not whitelist or entry in whitelist:
                for k, v in stat._asdict().iteritems():
                    self.registry.gauge("nic-%s.%s" % (entry.replace(" ", "_"), k)).set_value(v)
dataset/ETHPy150Open omergertel/pyformance/example_sysmetrics.py/Collector.collect_network_io/original