示例#1
0
def test_get_measurements(*mock):
    resgroup = ResGroup(name=RESCTRL_ROOT_NAME)
    assert {'task_mem_bandwidth_bytes': 6,
            'task_llc_occupancy_bytes': 2,
            'task_mem_bandwidth_local_bytes': 4,
            'task_mem_bandwidth_remote_bytes': 2} == \
        resgroup.get_measurements('best_efforts', True, True)
示例#2
0
def test_get_measurements(*mock):
    resgroup = ResGroup(name=RESCTRL_ROOT_NAME)
    assert {'memory_bandwidth': 6,
            'llc_occupancy': 2,
            'memory_bandwidth_local': 4,
            'memory_bandwidth_remote': 2} == \
        resgroup.get_measurements('best_efforts', True, True)
def test_get_measurements_race(*mock):
    resgroup = ResGroup(name=RESCTRL_ROOT_NAME)
    with pytest.raises(MissingMeasurementException):
        resgroup.get_measurements('best_efforts', True, True)