Commit 0c24b083 authored by Noric Couderc's avatar Noric Couderc
Browse files

Deleted unused function runFunction

parent 65ebc8f2
......@@ -59,35 +59,6 @@ open class PapiRunner(numRuns : Int, counters: CounterSpecification) {
return data
}
/**
* Runs a function several times
* @return A map from PAPI counter names to list of values
*/
inline fun runFunction(counter: String, function: () -> Unit): MutableList<Long> {
val counterId = counterSpec.getCounter(counter)!!
// We record only one counter
var evset = EventSet.create()
try {
evset = EventSet.create(counterId)
} catch (e: PapiException) {
error("Failed to sample counter: ${counter}")
}
// We run the function n times
var values = mutableListOf<Long>()
for (run in 0..numRuns) {
// We do the measurements
evset.start()
val result = function()
evset.stop()
// We record the data
val data = evset.counters
values.addAll(data.toList())
}
return values
}
data class RunSpec(val numRuns: Int,
val counter : String,
val eventSet: EventSet,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment