def test_io_counters(self):
        if not supports_iocounters():
            self.skipTest("No IO counter support on this platform")

        detail = process_details(io=True)
        assert 'read_bytes' in detail['io']
        assert 'write_bytes' in detail['io']
        assert 'read_count' in detail['io']
        assert 'write_count' in detail['io']
    def test_io_counters(self):
        if not supports_iocounters():
            self.skipTest("No IO counter support on this platform")

        self.client.procinfo(io=True)
        detail = [json.loads(msg) for msg in self.client.sender.msgs]

        found_rb = False
        found_wb = False
        found_rc = False
        found_wc = False
        for statsd in detail['io']:
            if statsd['fields']['name'] == 'read_bytes':
                found_rb = statsd['payload']
            if statsd['fields']['name'] == 'write_bytes':
                found_wb = statsd['payload']
            if statsd['fields']['name'] == 'read_count':
                found_rc = statsd['payload']
            if statsd['fields']['name'] == 'write_count':
                found_wc = statsd['payload']
        assert found_wc and found_rc and found_wb and found_rb