[ring] Fix performance report

This commit is contained in:
Ilya Matveev
2017-12-29 18:36:37 +07:00
committed by ilmat192
parent 3b7d16c70e
commit 2a1d0433ca
2 changed files with 12 additions and 2 deletions
+12 -1
View File
@@ -18,6 +18,10 @@ buildscript {
}
repositories {
maven {
//TODO: this path should be removed!!
url "https://oss.sonatype.org/content/repositories/snapshots"
}
maven {
url kotlinCompilerRepo
}
@@ -91,12 +95,19 @@ task bench(type:DefaultTask) {
doLast {
def jvmReport = new Report(project.file("build/jvmReport.txt"))
def konanReport = new Report(project.file("build/konanReport.txt"))
def average = "none"
jvmReport.report.each { k, v ->
def ratio = String.format('%.2f', konanReport.report[k]/v * 100)
if (k == 'RingAverage') {
average = ratio
}
println("$k : $ratio %")
if (System.getenv("TEAMCITY_BUILD_PROPERTIES_FILE") != null)
println("##teamcity[buildStatisticValue key='$k' value='$ratio']")
}
println()
println("Average Ring score: $average %")
}
}
@@ -105,7 +116,7 @@ class Report {
def Map<String, Double> report = new HashMap()
Report(File path) {
path.readLines().drop(3).takeWhile { it.split(':').length == 2 }.each {
path.readLines().drop(3).findAll { it.split(':').length == 2 }.each {
def p = it.split(':')
report.put(p[0].trim(), Double.parseDouble(p[1].trim()))
}
-1
View File
@@ -55,7 +55,6 @@ private String defFileToInstallTaskName(String target, String name) {
return "install${defFileToLibName(target, name).capitalize()}"
}
// TODO: Fix the report in performance project
class KlibInstall extends Exec {
@InputFile
public File klib