Fix PackageFunction's call to Package.Builder.Helper#onLoadingComplete to pass
along the wall time of the load, even when the package in question was in PackageFunction's
internal cache (e.g. the current #compute call is a PackageFunction Skyframe restart).
Also clarify the intent of the 'loadTimeMs' param in #onLoadingComplete.
RELNOTES: None
PiperOrigin-RevId: 188253198
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 9db519e..03f2de6 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
@@ -732,7 +732,10 @@
*
* @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
+ * @param loadTimeMs the wall time, in ms, that it took to load the package. More precisely,
+ * this is the wall time of the call to {@link PackageFactory#createPackageFromAst}.
+ * Notably, this does not include the time to read and parse the package's BUILD file, nor
+ * the time to read, parse, or evaluate any of the transitively loaded .bzl files.
*/
void onLoadingComplete(Package pkg, SkylarkSemantics skylarkSemantics, long loadTimeMs);
}