Skip to content

Commit

Permalink
fix(billing): proper calculation of flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
Malinskiy committed Nov 23, 2023
1 parent 8486978 commit 8ecf1c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ internal class BillingReporter(

usageTracker.trackEvent(Event.Devices(bills.size))
val result = executionReport.summary.pools.map { it.failed.isEmpty() }.reduceOrNull { acc, b -> acc && b } ?: true
val flakiness = executionReport.summary.pools.sumOf { it.rawDurationMillis - it.durationMillis / 1000 }
val flakiness = executionReport.summary.pools.sumOf { (it.rawDurationMillis - it.durationMillis) / 1000 }
val durationSeconds = ((Instant.now().toEpochMilli() - defaultStart.toEpochMilli()) / 1000)
usageTracker.trackEvent(Event.Executed(seconds = bills.sumOf { it.duration } / 1000,
success = result,
Expand Down

0 comments on commit 8ecf1c6

Please sign in to comment.