Added options in external report (#3534)
This commit is contained in:
+23
-10
@@ -88,19 +88,29 @@ task registerExternalBenchmarks {
|
|||||||
return
|
return
|
||||||
|
|
||||||
def lines = reportFile.readLines()
|
def lines = reportFile.readLines()
|
||||||
if (lines.size < 3) {
|
if (lines.size < 4) {
|
||||||
println("Couldn't use report to register benchmarks. Wrong format.")
|
project.logger.warn("Couldn't use report to register benchmarks. Wrong format.")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
def name = lines[0]
|
def name = lines[0]
|
||||||
def status = lines[1]
|
def options = lines[1]
|
||||||
def compileTime = lines[2]
|
if (!options.startsWith("OPTIONS")) {
|
||||||
|
project.logger.warn("Couldn't use report to register benchmarks. Wrong format in options description.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
def optionsList = options.replace("OPTIONS ", "").replaceAll("\\[|\\]", "").split(",\\s*").toList()
|
||||||
|
def status = lines[2]
|
||||||
|
def compileTime = null
|
||||||
def codeSize = null
|
def codeSize = null
|
||||||
if (lines.size > 3) {
|
lines.drop(3).each {
|
||||||
codeSize = lines[3]
|
if (it.startsWith("COMPILE_TIME")) {
|
||||||
|
compileTime = it
|
||||||
|
}
|
||||||
|
if (it.startsWith("CODE_SIZE")) {
|
||||||
|
codeSize = it
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Create benchmarks report.
|
// Create benchmarks report.
|
||||||
def compileBenchmark = MPPTools.toCompileBenchmark(compileTime, status, name)
|
|
||||||
def properties = [
|
def properties = [
|
||||||
"cpu": System.getProperty("os.arch"),
|
"cpu": System.getProperty("os.arch"),
|
||||||
"os": System.getProperty("os.name"),
|
"os": System.getProperty("os.name"),
|
||||||
@@ -109,9 +119,12 @@ task registerExternalBenchmarks {
|
|||||||
"kotlinVersion": kotlinVersion,
|
"kotlinVersion": kotlinVersion,
|
||||||
"type": "native",
|
"type": "native",
|
||||||
"compilerVersion": konanVersion,
|
"compilerVersion": konanVersion,
|
||||||
"flags": ["-g"],
|
"flags": optionsList,
|
||||||
"benchmarks": "[]",
|
"benchmarks": "[]"]
|
||||||
"compileTime": [compileBenchmark]]
|
if (compileTime != null) {
|
||||||
|
def compileBenchmark = MPPTools.toCompileBenchmark(compileTime, status, name)
|
||||||
|
properties += ["compileTime": [compileBenchmark]]
|
||||||
|
}
|
||||||
if (codeSize != null) {
|
if (codeSize != null) {
|
||||||
properties += ["codeSize": MPPTools.toCodeSizeBenchmark(codeSize, status, name)]
|
properties += ["codeSize": MPPTools.toCodeSizeBenchmark(codeSize, status, name)]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user