Created
March 6, 2019 16:22
-
-
Save Malinskiy/e7744f5096a48ecdf90986458fc9b9f1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExecutionTimeSortingStrategy(val percentile: Double, | |
val timeLimit: Instant) : SortingStrategy { | |
override fun process(metricsProvider: MetricsProvider): Comparator<Test> = | |
Comparator.comparingDouble<Test> { | |
val expectedDuration = metricsProvider.executionTime(it, percentile, timeLimit) | |
expectedDuration | |
}.reversed() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment