# Path: pyinstrument/low_level/stat_profile_python.py
# def setstatprofile(target, interval=0.001, context_var=None, timer_func=None):
#     if target:
#         profiler = PythonStatProfiler(
#             target=target,
#             interval=interval,
#             context_var=context_var,
#             timer_func=timer_func,
#         )
#         sys.setprofile(profiler.profile)
#     else:
#         sys.setprofile(None)


import functools
import pytest
from pyinstrument.low_level.stat_profile import setstatprofile as setstatprofile_c
from pyinstrument.low_level.stat_profile_python import setstatprofile as setstatprofile_python



"""
Parametrizes the test with both the C and Python setstatprofile, just to check
that the Python one is up-to-date with the C version.
"""
parametrize_setstatprofile = pytest.mark.parametrize(
    "setstatprofile",

# Path: pyinstrument/low_level/stat_profile_python.py
# def setstatprofile(target, interval=0.001, context_var=None, timer_func=None):
#     if target:
#         profiler = PythonStatProfiler(
#             target=target,
#             interval=interval,
#             context_var=context_var,
#             timer_func=timer_func,
#         )
#         sys.setprofile(profiler.profile)
#     else:
#         sys.setprofile(None)


# Path: test/low_level/util.py
import functools
import pytest
from pyinstrument.low_level.stat_profile import setstatprofile as setstatprofile_c
from pyinstrument.low_level.stat_profile_python import setstatprofile as setstatprofile_python




"""
Parametrizes the test with both the C and Python setstatprofile, just to check
that the Python one is up-to-date with the C version.
"""
parametrize_setstatprofile = pytest.mark.parametrize(
    "setstatprofile",

    [setstatprofile_c, setstatprofile_python],