KT-45777: Add debug log messages for classpath snapshot feature
Also clean up classpath snapshot shrinking a bit to make it clearer. ^KT-45777 In Progress
This commit is contained in:
+4
-1
@@ -95,8 +95,11 @@ abstract class ClasspathEntrySnapshotTransform : TransformAction<ClasspathEntryS
|
||||
metrics.addMetric(BuildPerformanceMetric.CLASSPATH_ENTRY_SNAPSHOT_TRANSFORM_EXECUTION_COUNT, 1)
|
||||
if (classpathEntryInputDirOrJar.extension.equals("jar", ignoreCase = true)) {
|
||||
metrics.addMetric(BuildPerformanceMetric.JAR_CLASSPATH_ENTRY_SIZE, classpathEntryInputDirOrJar.length())
|
||||
metrics.addMetric(BuildPerformanceMetric.JAR_CLASSPATH_ENTRY_SNAPSHOT_SIZE, snapshotOutputFile.length())
|
||||
} else {
|
||||
// Only compute the size of the snapshot, not the size of the input directory as walking the file tree has a small overhead
|
||||
metrics.addMetric(BuildPerformanceMetric.DIRECTORY_CLASSPATH_ENTRY_SNAPSHOT_SIZE, snapshotOutputFile.length())
|
||||
}
|
||||
metrics.addMetric(BuildPerformanceMetric.CLASSPATH_ENTRY_SNAPSHOT_SIZE, snapshotOutputFile.length())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -292,7 +292,7 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments> @Inject constr
|
||||
private fun getKotlinBuildDir(task: T): Provider<Directory> =
|
||||
task.project.layout.buildDirectory.dir("$KOTLIN_BUILD_DIR_NAME/${task.name}")
|
||||
|
||||
protected fun getClasspathSnapshotDir(task: T): Provider<Directory> =
|
||||
protected open fun getClasspathSnapshotDir(task: T): Provider<Directory> =
|
||||
getKotlinBuildDir(task).map { it.dir("classpath-snapshot") }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user