File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2044,6 +2044,13 @@ def line_profiler_step(
20442044 self .write_code_and_helpers (
20452045 self .function_to_optimize_source_code , original_helper_code , self .function_to_optimize .file_path
20462046 )
2047+ # this will happen when a timeoutexpired exception happens
2048+ if isinstance (line_profile_results , TestResults ) and not line_profile_results .test_results :
2049+ logger .warning (
2050+ f"Timeout occured while running line profiler for original function { self .function_to_optimize .function_name } "
2051+ )
2052+ # set default value for line profiler results
2053+ return {"timings" : {}, "unit" : 0 , "str_out" : "" }
20472054 if line_profile_results ["str_out" ] == "" :
20482055 logger .warning (
20492056 f"Couldn't run line profiler for original function { self .function_to_optimize .function_name } "
You can’t perform that action at this time.
0 commit comments