Add flag to print more condensed build stats The new flag is called --experimental_stats_summary. I do not consider this flag an incompatible change, since we don't guarantee the exact text output on the command-line. The intent is to switch to the new summary style and then retire the flag. The new stats look like this: INFO: 5,000 processes: 1,000 remote, 1,000 local, 1,000 worker, 2,000 cached INFO: Total action wall time 100.34s INFO: Critical path 5.22s (setup 1.34s, wall time 3.89s) INFO: Elapsed time 8.89s (loading 2.55s, execution 6.34s) The breakdown in the last two lines follows the idea that we want to distinguish between useful work and 'overhead': - For the critical path breakdown, the wall time is the sum of all wall times of all actions on the critical path, whereas 'setup' refers to everything other than subprocess execution wall time. - For the elapsed time breakdown, the execution time is the time of the execution phase (which in turn is determined by the critical path), whereas 'loading' refers to everything other than execution. Terminology is hard and we're already using these terms to denote different things. Suggestions welcome. PiperOrigin-RevId: 222231747
diff --git a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java index 0f9e2c2..34aeffb 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java +++ b/src/main/java/com/google/devtools/build/lib/exec/ExecutionOptions.java
@@ -300,6 +300,15 @@ public boolean enableCriticalPathProfiling; @Option( + name = "experimental_stats_summary", + documentationCategory = OptionDocumentationCategory.UNDOCUMENTED, + effectTags = {OptionEffectTag.TERMINAL_OUTPUT}, + defaultValue = "false", + help = "Enable a modernized summary of the build stats." + ) + public boolean statsSummary; + + @Option( name = "experimental_execution_log_file", defaultValue = "", category = "verbosity",