[Config] Adding a default for the option load

Reviewed By: jberdine

Differential Revision: D3900257

fbshipit-source-id: c664968
master
Dulma Churchill 8 years ago committed by Facebook Github Bot 7
parent ae759ee21f
commit 526cf6da6a

@ -820,9 +820,8 @@ and latex =
~meta:"file" "Print latex report to a file" ~meta:"file" "Print latex report to a file"
and load_average = and load_average =
CLOpt.mk_option ~long:"load-average" ~short:"l" ~f:(fun s -> Some (float_of_string s)) CLOpt.mk_float ~long:"load-average" ~short:"l" ~default:(float_of_int ncpu)
~meta:"float" ~exes:CLOpt.[Toplevel] ~meta:"float"
~exes:CLOpt.[Toplevel]
"Do not start new parallel jobs if the load average is greater than that specified (Buck and \ "Do not start new parallel jobs if the load average is greater than that specified (Buck and \
make only)" make only)"

@ -84,7 +84,7 @@ val infer_py_argparse_error_exit_code : int
val initial_analysis_time : float val initial_analysis_time : float
val ivar_attributes : string val ivar_attributes : string
val lint_issues_dir_name : string val lint_issues_dir_name : string
val load_average : float option val load_average : float
val log_analysis_crash : string val log_analysis_crash : string
val log_analysis_file : string val log_analysis_file : string
val log_analysis_procedure : string val log_analysis_procedure : string

@ -97,8 +97,7 @@ let () =
(match Config.infer_cache with None -> [] | Some s -> (match Config.infer_cache with None -> [] | Some s ->
["--infer_cache"; s]) @ ["--infer_cache"; s]) @
"-j" :: (string_of_int Config.jobs) :: "-j" :: (string_of_int Config.jobs) ::
(match Config.load_average with None -> [] | Some f -> "-l" :: (string_of_float Config.load_average) ::
["-l"; string_of_float f]) @
(if not Config.pmd_xml then [] else (if not Config.pmd_xml then [] else
["--pmd-xml"]) @ ["--pmd-xml"]) @
(if not Config.reactive_mode then [] else (if not Config.reactive_mode then [] else

Loading…
Cancel
Save