[stats] Emit the stats only in developer mode

Reviewed By: jvillard

Differential Revision: D5920986

fbshipit-source-id: 4b146e5
master
Dulma Churchill 7 years ago committed by Facebook Github Bot
parent ba6ef4f5b2
commit 0212aaf81f

@ -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

@ -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 =

@ -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 ()

@ -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

@ -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 () ;

Loading…
Cancel
Save