[ring] Fix performance report
This commit is contained in:
@@ -18,6 +18,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
maven {
|
||||||
|
//TODO: this path should be removed!!
|
||||||
|
url "https://oss.sonatype.org/content/repositories/snapshots"
|
||||||
|
}
|
||||||
maven {
|
maven {
|
||||||
url kotlinCompilerRepo
|
url kotlinCompilerRepo
|
||||||
}
|
}
|
||||||
@@ -91,12 +95,19 @@ task bench(type:DefaultTask) {
|
|||||||
doLast {
|
doLast {
|
||||||
def jvmReport = new Report(project.file("build/jvmReport.txt"))
|
def jvmReport = new Report(project.file("build/jvmReport.txt"))
|
||||||
def konanReport = new Report(project.file("build/konanReport.txt"))
|
def konanReport = new Report(project.file("build/konanReport.txt"))
|
||||||
|
def average = "none"
|
||||||
jvmReport.report.each { k, v ->
|
jvmReport.report.each { k, v ->
|
||||||
def ratio = String.format('%.2f', konanReport.report[k]/v * 100)
|
def ratio = String.format('%.2f', konanReport.report[k]/v * 100)
|
||||||
|
if (k == 'RingAverage') {
|
||||||
|
average = ratio
|
||||||
|
}
|
||||||
println("$k : $ratio %")
|
println("$k : $ratio %")
|
||||||
if (System.getenv("TEAMCITY_BUILD_PROPERTIES_FILE") != null)
|
if (System.getenv("TEAMCITY_BUILD_PROPERTIES_FILE") != null)
|
||||||
println("##teamcity[buildStatisticValue key='$k' value='$ratio']")
|
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()
|
def Map<String, Double> report = new HashMap()
|
||||||
|
|
||||||
Report(File path) {
|
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(':')
|
def p = it.split(':')
|
||||||
report.put(p[0].trim(), Double.parseDouble(p[1].trim()))
|
report.put(p[0].trim(), Double.parseDouble(p[1].trim()))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ private String defFileToInstallTaskName(String target, String name) {
|
|||||||
return "install${defFileToLibName(target, name).capitalize()}"
|
return "install${defFileToLibName(target, name).capitalize()}"
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Fix the report in performance project
|
|
||||||
class KlibInstall extends Exec {
|
class KlibInstall extends Exec {
|
||||||
@InputFile
|
@InputFile
|
||||||
public File klib
|
public File klib
|
||||||
|
|||||||
Reference in New Issue
Block a user