Skip to content

Commit

Permalink
Merge pull request TencentBlueKing#1049 from cnlkl/issue_1048
Browse files Browse the repository at this point in the history
fix: 修复导出扫描速度报错 TencentBlueKing#1048
  • Loading branch information
owenlxu authored Aug 11, 2023
2 parents 8ec4881 + 8c176b0 commit e3dab81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class ScannerMetrics(
) {
val fileExtensionName = fullPath.substringAfterLast('.', UNKNOWN_EXTENSION)
val summary = taskSpeedSummary(fileExtensionName, scanner)
val elapsedSeconds = duration.seconds.toDouble()
val elapsedSeconds = maxOf(duration.seconds.toDouble(), 1.0)
summary.record(fileSize / elapsedSeconds)
}

Expand Down

0 comments on commit e3dab81

Please sign in to comment.