Added possibility to use cset to run benchmarks in the isolated cpus
This commit is contained in:
committed by
LepilkinaElena
parent
e9dd7cb3b6
commit
8b2fed994a
@@ -56,8 +56,15 @@ open class RunKotlinNativeTask @Inject constructor(private val linkTask: Task,
|
||||
|
||||
private fun execBenchmarkOnce(benchmark: String, warmupCount: Int, repeatCount: Int) : String {
|
||||
val output = ByteArrayOutputStream()
|
||||
val useCset = project.property("useCset").toString().toBoolean()
|
||||
project.exec {
|
||||
it.executable = executable
|
||||
if (useCset) {
|
||||
it.executable = "cset"
|
||||
it.args("shield", "--exec", "--", executable)
|
||||
} else {
|
||||
it.executable = executable
|
||||
}
|
||||
|
||||
it.args(argumentsList)
|
||||
it.args("-f", benchmark)
|
||||
// Logging with application should be done only in case it controls running benchmarks itself.
|
||||
@@ -69,7 +76,7 @@ open class RunKotlinNativeTask @Inject constructor(private val linkTask: Task,
|
||||
it.args("-r", repeatCount.toString())
|
||||
it.standardOutput = output
|
||||
}
|
||||
return output.toString().removePrefix("[").removeSuffix("]")
|
||||
return output.toString().substringAfter("[").removeSuffix("]")
|
||||
}
|
||||
|
||||
private fun execBenchmarkRepeatedly(benchmark: String, warmupCount: Int, repeatCount: Int) : List<String> {
|
||||
|
||||
Reference in New Issue
Block a user