2424requires_gevent = pytest .mark .skipif (gevent is None , reason = "gevent not enabled" )
2525
2626
27- def get_client_options (use_top_level_profiler_mode ):
27+ def get_client_options ():
2828 def client_options (
2929 mode = None , auto_start = None , profile_session_sample_rate = 1.0 , lifecycle = "manual"
3030 ):
31- if use_top_level_profiler_mode :
32- return {
33- "profile_lifecycle" : lifecycle ,
34- "profiler_mode" : mode ,
35- "profile_session_sample_rate" : profile_session_sample_rate ,
36- "_experiments" : {
37- "continuous_profiling_auto_start" : auto_start ,
38- },
39- }
4031 return {
4132 "profile_lifecycle" : lifecycle ,
33+ "profiler_mode" : mode ,
4234 "profile_session_sample_rate" : profile_session_sample_rate ,
4335 "_experiments" : {
4436 "continuous_profiling_auto_start" : auto_start ,
45- "continuous_profiling_mode" : mode ,
4637 },
4738 }
4839
@@ -60,8 +51,7 @@ def client_options(
6051@pytest .mark .parametrize (
6152 "make_options" ,
6253 [
63- pytest .param (get_client_options (True ), id = "non-experiment" ),
64- pytest .param (get_client_options (False ), id = "experiment" ),
54+ pytest .param (get_client_options ()),
6555 ],
6656)
6757def test_continuous_profiler_invalid_mode (mode , make_options , teardown_profiling ):
@@ -83,8 +73,7 @@ def test_continuous_profiler_invalid_mode(mode, make_options, teardown_profiling
8373@pytest .mark .parametrize (
8474 "make_options" ,
8575 [
86- pytest .param (get_client_options (True ), id = "non-experiment" ),
87- pytest .param (get_client_options (False ), id = "experiment" ),
76+ pytest .param (get_client_options ()),
8877 ],
8978)
9079def test_continuous_profiler_valid_mode (mode , make_options , teardown_profiling ):
@@ -106,8 +95,7 @@ def test_continuous_profiler_valid_mode(mode, make_options, teardown_profiling):
10695@pytest .mark .parametrize (
10796 "make_options" ,
10897 [
109- pytest .param (get_client_options (True ), id = "non-experiment" ),
110- pytest .param (get_client_options (False ), id = "experiment" ),
98+ pytest .param (get_client_options ()),
11199 ],
112100)
113101def test_continuous_profiler_setup_twice (mode , make_options , teardown_profiling ):
@@ -215,8 +203,7 @@ def assert_single_transaction_without_profile_chunks(envelopes):
215203@pytest .mark .parametrize (
216204 "make_options" ,
217205 [
218- pytest .param (get_client_options (True ), id = "non-experiment" ),
219- pytest .param (get_client_options (False ), id = "experiment" ),
206+ pytest .param (get_client_options ()),
220207 ],
221208)
222209@mock .patch ("sentry_sdk.profiler.continuous_profiler.PROFILE_BUFFER_SECONDS" , 0.01 )
@@ -275,8 +262,7 @@ def test_continuous_profiler_auto_start_and_manual_stop(
275262@pytest .mark .parametrize (
276263 "make_options" ,
277264 [
278- pytest .param (get_client_options (True ), id = "non-experiment" ),
279- pytest .param (get_client_options (False ), id = "experiment" ),
265+ pytest .param (get_client_options ()),
280266 ],
281267)
282268@mock .patch ("sentry_sdk.profiler.continuous_profiler.PROFILE_BUFFER_SECONDS" , 0.01 )
@@ -340,8 +326,7 @@ def test_continuous_profiler_manual_start_and_stop_sampled(
340326@pytest .mark .parametrize (
341327 "make_options" ,
342328 [
343- pytest .param (get_client_options (True ), id = "non-experiment" ),
344- pytest .param (get_client_options (False ), id = "experiment" ),
329+ pytest .param (get_client_options ()),
345330 ],
346331)
347332def test_continuous_profiler_manual_start_and_stop_unsampled (
@@ -382,8 +367,7 @@ def test_continuous_profiler_manual_start_and_stop_unsampled(
382367@pytest .mark .parametrize (
383368 "make_options" ,
384369 [
385- pytest .param (get_client_options (True ), id = "non-experiment" ),
386- pytest .param (get_client_options (False ), id = "experiment" ),
370+ pytest .param (get_client_options ()),
387371 ],
388372)
389373@mock .patch ("sentry_sdk.profiler.continuous_profiler.DEFAULT_SAMPLING_FREQUENCY" , 21 )
@@ -444,8 +428,7 @@ def test_continuous_profiler_auto_start_and_stop_sampled(
444428@pytest .mark .parametrize (
445429 "make_options" ,
446430 [
447- pytest .param (get_client_options (True ), id = "non-experiment" ),
448- pytest .param (get_client_options (False ), id = "experiment" ),
431+ pytest .param (get_client_options ()),
449432 ],
450433)
451434@mock .patch ("sentry_sdk.profiler.continuous_profiler.PROFILE_BUFFER_SECONDS" , 0.01 )
@@ -493,8 +476,7 @@ def test_continuous_profiler_auto_start_and_stop_unsampled(
493476@pytest .mark .parametrize (
494477 "make_options" ,
495478 [
496- pytest .param (get_client_options (True ), id = "non-experiment" ),
497- pytest .param (get_client_options (False ), id = "experiment" ),
479+ pytest .param (get_client_options ()),
498480 ],
499481)
500482def test_continuous_profiler_manual_start_and_stop_noop_when_using_trace_lifecyle (
0 commit comments