Added measuring code size for full application

This commit is contained in:
Elena Lepilkina
2019-01-30 15:14:56 +03:00
committed by LepilkinaElena
parent f47feb9d85
commit f54f570fbf
4 changed files with 28 additions and 8 deletions
@@ -20,7 +20,6 @@ import org.w3c.xhr.*
import kotlin.browser.*
import kotlin.js.*
actual fun readFile(fileName: String): String {
error("Reading from local file for JS isn't supported")
}
@@ -38,7 +38,7 @@ data class MeanVarianceBenchmark(val meanBenchmark: BenchmarkResult, val varianc
fun calcPercentageDiff(other: MeanVarianceBenchmark): MeanVariance {
assert(other.meanBenchmark.score >= 0 &&
other.varianceBenchmark.score >= 0 &&
abs(other.meanBenchmark.score - other.varianceBenchmark.score) != 0.0,
other.meanBenchmark.score - other.varianceBenchmark.score != 0.0,
{ "Mean and variance should be positive and not equal!" })
val mean = (meanBenchmark.score - other.meanBenchmark.score) / other.meanBenchmark.score
val maxValueChange = abs(meanBenchmark.score + varianceBenchmark.score -