From bf210844d98f57472d115a300676eaefd6cf6275 Mon Sep 17 00:00:00 2001 From: Fernando Gasperi Jabalera Date: Tue, 18 Feb 2020 06:12:47 -0800 Subject: [PATCH] Log the scheduler and cores used as part of the environment Summary: Add the number of cores used and the scheduler type to the environment info printed before running. Reviewed By: ngorogiannis Differential Revision: D19941243 fbshipit-source-id: 576e9f610 --- infer/src/infer.ml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/infer/src/infer.ml b/infer/src/infer.ml index e3ef426e2..b667544ff 100644 --- a/infer/src/infer.ml +++ b/infer/src/infer.ml @@ -74,6 +74,19 @@ let print_active_checkers () = (RegisterCheckers.get_active_checkers ()) +let print_scheduler () = + L.environment_info "Scheduler: %s@\n" + ( match Config.scheduler with + | File -> + "file" + | Restart -> + "restart" + | SyntacticCallGraph -> + "callgraph" ) + + +let print_cores_used () = L.environment_info "Cores used: %d@\n" Config.jobs + let log_environment_info () = L.environment_info "CWD = %s@\n" (Sys.getcwd ()) ; ( match Config.inferconfig_file with @@ -99,7 +112,7 @@ let log_environment_info () = | Some available_memory -> L.environment_info "Available memory at startup: %d MB@\n" available_memory ; ScubaLogging.log_count ~label:"startup_mem_avail_MB" ~value:available_memory ) ; - print_active_checkers () + print_active_checkers () ; print_scheduler () ; print_cores_used () let prepare_events_logging () =