Fixed reporting NPM download time
#KT-39109 Fixed
This commit is contained in:
+5
-2
@@ -52,8 +52,11 @@ open class NodeJsSetupTask : DefaultTask() {
|
|||||||
val startDownloadTime = System.currentTimeMillis()
|
val startDownloadTime = System.currentTimeMillis()
|
||||||
val result = conf.resolve().single()
|
val result = conf.resolve().single()
|
||||||
|
|
||||||
KotlinBuildStatsService.getInstance()
|
val downloadDuration = System.currentTimeMillis() - startDownloadTime
|
||||||
?.report(NumericalMetrics.ARTIFACTS_DOWNLOAD_SPEED, result.length() * 1000 / (System.currentTimeMillis() - startDownloadTime))
|
if (downloadDuration > 0) {
|
||||||
|
KotlinBuildStatsService.getInstance()
|
||||||
|
?.report(NumericalMetrics.ARTIFACTS_DOWNLOAD_SPEED, result.length() * 1000 / downloadDuration)
|
||||||
|
}
|
||||||
|
|
||||||
project.repositories.remove(repo)
|
project.repositories.remove(repo)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user