|
@@ -45,10 +45,22 @@ sentry_sdk.init(
|
|
|
params.profilingOptions?.defaultProfilingMode === 'continuous'
|
|
|
? `
|
|
|
|
|
|
+def slow_function():
|
|
|
+ import time
|
|
|
+ time.sleep(0.1)
|
|
|
+ return "done"
|
|
|
+
|
|
|
+def fast_function():
|
|
|
+ import time
|
|
|
+ time.sleep(0.05)
|
|
|
+ return "done"
|
|
|
+
|
|
|
# Manually call start_profiler and stop_profiler
|
|
|
# to profile the code in between
|
|
|
sentry_sdk.profiler.start_profiler()
|
|
|
-# this code will be profiled
|
|
|
+for i in range(0, 10):
|
|
|
+ slow_function()
|
|
|
+ fast_function()
|
|
|
#
|
|
|
# Calls to stop_profiler are optional - if you don't stop the profiler, it will keep profiling
|
|
|
# your application until the process exits or stop_profiler is called.
|