diff --git a/infer/src/backend/InferPrint.ml b/infer/src/backend/InferPrint.ml index 0cdde1b6e..6658c5036 100644 --- a/infer/src/backend/InferPrint.ml +++ b/infer/src/backend/InferPrint.ml @@ -1151,7 +1151,7 @@ let main ~report_csv ~report_json = ; (Stats, init_stats_format_list ()) ; (Summary, init_summary_format_list ()) ] in - register_perf_stats_report () ; + if Config.developer_mode then register_perf_stats_report () ; init_files formats_by_report_kind ; match Config.from_json_report with | Some fname diff --git a/infer/src/backend/infer.ml b/infer/src/backend/infer.ml index e852db474..acc6aaaa9 100644 --- a/infer/src/backend/infer.ml +++ b/infer/src/backend/infer.ml @@ -108,7 +108,7 @@ let () = -> F.fprintf fmt "of cluster %s" (Filename.basename cluster) in L.environment_info "Starting analysis %a" pp_cluster_opt Config.cluster_cmdline ; - InferAnalyze.register_perf_stats_report () ; + if Config.developer_mode then InferAnalyze.register_perf_stats_report () ; Driver.analyze_and_report Analyze ~changed_files:(Driver.read_config_changed_files ()) | Report -> let report_json = diff --git a/infer/src/clang/Capture.ml b/infer/src/clang/Capture.ml index 963bfc337..a9d2b604f 100644 --- a/infer/src/clang/Capture.ml +++ b/infer/src/clang/Capture.ml @@ -32,7 +32,7 @@ let register_perf_stats_report source_file = let init_global_state_for_capture_and_linters source_file = L.(debug Capture Medium) "Processing %s" (Filename.basename (SourceFile.to_abs_path source_file)) ; - register_perf_stats_report source_file ; + if Config.developer_mode then register_perf_stats_report source_file ; Config.curr_language := Config.Clang ; DB.Results_dir.init source_file ; CFrontend_config.reset_global_state () diff --git a/infer/src/integration/Driver.ml b/infer/src/integration/Driver.ml index 31e54cda6..c0c67851a 100644 --- a/infer/src/integration/Driver.ml +++ b/infer/src/integration/Driver.ml @@ -560,7 +560,7 @@ let run_prologue mode = anyway, pretend that we are not called from another make to prevent make falling back to a mono-threaded execution. *) Unix.unsetenv "MAKEFLAGS" ; - register_perf_stats_report () ; + if Config.developer_mode then register_perf_stats_report () ; if not Config.buck_cache_mode && not Config.infer_is_clang && not Config.infer_is_javac then touch_start_file_unless_continue () ; () @@ -568,7 +568,7 @@ let run_prologue mode = let run_epilogue mode = ( if CLOpt.is_originator then let in_buck_mode = match mode with PythonCapture (BBuck, _) -> true | _ -> false in - StatsAggregator.generate_files () ; + if Config.developer_mode then StatsAggregator.generate_files () ; if Config.equal_analyzer Config.analyzer Config.Crashcontext then Crashcontext.crashcontext_epilogue ~in_buck_mode ; if CLOpt.(equal_command Run) Config.command && Config.fail_on_bug then diff --git a/infer/src/java/jMain.ml b/infer/src/java/jMain.ml index c34e8302b..a0fb18e0d 100644 --- a/infer/src/java/jMain.ml +++ b/infer/src/java/jMain.ml @@ -20,7 +20,7 @@ let register_perf_stats_report source_file = PerfStats.register_report_at_exit (Filename.concat stats_dir stats_file) let init_global_state source_file = - register_perf_stats_report source_file ; + if Config.developer_mode then register_perf_stats_report source_file ; Config.curr_language := Config.Java ; DB.Results_dir.init source_file ; Ident.NameGenerator.reset () ;