Add system load average to profile, guarded by --experimental_collect_load_average_in_profiler flag.

PiperOrigin-RevId: 468468092
Change-Id: Ic69b06efa15e3cb85a22b4c5b3561a8be2aba22c
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index 942a61c..8e4ffdc 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -313,10 +313,18 @@
       defaultValue = "false",
       documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
       effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING},
-      help = "If enabled, profiler collects worker's aggregated resource data.")
+      help = "If enabled, the profiler collects worker's aggregated resource data.")
   public boolean collectWorkerDataInProfiler;
 
   @Option(
+      name = "experimental_collect_load_average_in_profiler",
+      defaultValue = "false",
+      documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
+      effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING},
+      help = "If enabled, the profiler collects the system's overall load average.")
+  public boolean collectLoadAverageInProfiler;
+
+  @Option(
       name = "memory_profile",
       defaultValue = "null",
       documentationCategory = OptionDocumentationCategory.LOGGING,