Commit 728c6b0f authored by Noric Couderc's avatar Noric Couderc
Browse files

Refactoring: Extracted Function

parent 783337cf
......@@ -16,9 +16,7 @@ class Experiment(val numberIterations : Int,
val benchmark : BCBenchmarkPackage<*>,
val values : Map<Feature, Double>)
fun run() : List<Result> {
if (features.features.isEmpty()) { return listOf() }
fun getIterations(): List<List<PapiTracerRunner.TraceRecord>> {
val eventSetBuilder = EventSetBuilder()
eventSetBuilder.visitFeatureSet(features)
val counters = eventSetBuilder.getCounterSet()
......@@ -31,6 +29,14 @@ class Experiment(val numberIterations : Int,
evSet.destroy()
return iterations
}
fun run() : List<Result> {
if (features.features.isEmpty()) { return listOf() }
val iterations = getIterations()
var iterationNumber = 0
val results = mutableListOf<Result>()
for (i in iterations) {
......
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