async def METHOD_NAME(rest_api, core_resource_monitor):
    """
    Test starting and stopping the profiler using the API
    Note that we mock the start/stop profiler methods since actually starting the profiler could influence the
    tests.
    """
    core_resource_monitor.profiler.start = MagicMock()
    core_resource_monitor.profiler.stop = MagicMock()
    await do_request(rest_api, 'debug/profiler', expected_code=200, request_type='PUT')
    assert core_resource_monitor.profiler.start.called
    await do_request(rest_api, 'debug/profiler', expected_code=200, request_type='DELETE')
    assert core_resource_monitor.profiler.stop.called