Introduce an Extrema aggregator.

RELNOTES: None
PiperOrigin-RevId: 187370833
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java
index 0430700..7a8b121 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Package.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java
@@ -721,7 +721,7 @@
    */
   public static class Builder {
 
-    public static interface Helper {
+    public interface Helper {
       /**
        * Returns a fresh {@link Package} instance that a {@link Builder} will internally mutate
        * during package loading. Called by {@link PackageFactory}.
@@ -730,10 +730,13 @@
 
       /**
        * Called after {@link com.google.devtools.build.lib.skyframe.PackageFunction} is completely
-       * done loading the given {@link Package}. {@code skylarkSemantics} are the semantics used to
-       * evaluate the build.
+       * done loading the given {@link Package}.
+       *
+       * @param pkg the loaded {@link Package}
+       * @param skylarkSemantics are the semantics used to load the package
+       * @param loadTimeMs the wall time, in ms, that it took to load the package
        */
-      void onLoadingComplete(Package pkg, SkylarkSemantics skylarkSemantics);
+      void onLoadingComplete(Package pkg, SkylarkSemantics skylarkSemantics, long loadTimeMs);
     }
 
     /** {@link Helper} that simply calls the {@link Package} constructor. */
@@ -749,7 +752,8 @@
       }
 
       @Override
-      public void onLoadingComplete(Package pkg, SkylarkSemantics skylarkSemantics) {
+      public void onLoadingComplete(
+          Package pkg, SkylarkSemantics skylarkSemantics, long loadTimeMs) {
       }
     }