diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index e7b01e318..48bfe7262 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1450,6 +1450,8 @@ and java_jar_compiler = ~meta:"path" "Specify the Java compiler jar used to generate the bytecode" +and job_id = CLOpt.mk_string_opt ~long:"job-id" "Specify the job ID of this Infer run." + and jobs = CLOpt.mk_int ~deprecated:["-multicore"] ~long:"jobs" ~short:'j' ~default:ncpu ~in_help:InferCommand.([(Analyze, manual_generic)]) @@ -2508,6 +2510,8 @@ and java_jar_compiler = !java_jar_compiler and javac_classes_out = !javac_classes_out +and job_id = !job_id + and jobs = !jobs and join_cond = !join_cond diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index edcd7a9b8..269cf669e 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -443,6 +443,8 @@ val java_jar_compiler : string option val javac_classes_out : string +val job_id : string option + val jobs : int val join_cond : int diff --git a/infer/src/base/EventLogger.ml b/infer/src/base/EventLogger.ml index 50d5ae230..34b01b835 100644 --- a/infer/src/base/EventLogger.ml +++ b/infer/src/base/EventLogger.ml @@ -316,7 +316,7 @@ module LoggerImpl : S = struct |> add_string ~key:"hostname" ~data:(Unix.gethostname ()) |> add_string ~key:"infer_commit" ~data:Version.commit |> add_int ~key:"is_originator" ~data:(if CLOpt.is_originator then 1 else 0) - |> add_int ~key:"pid" ~data:(pid ()) + |> add_string_opt ~key:"job_id" ~data:Config.job_id |> add_int ~key:"pid" ~data:(pid ()) |> add_string ~key:"run_identifier" ~data:(get_log_identifier ()) |> add_int ~key:"sequence" ~data:(!sequence_ctr - 1) |> add_string ~key:"sysname" ~data:sysname