Commit 6b6c07c7 authored by Noric Couderc's avatar Noric Couderc
Browse files

Enabled start/stop when testing counters

A bit more thorough, you test they start/stop correctly.
parent f8f59ea2
...@@ -6,7 +6,6 @@ import papi.PapiException ...@@ -6,7 +6,6 @@ import papi.PapiException
import se.lth.cs.CounterSpecification import se.lth.cs.CounterSpecification
import se.lth.cs.util.Feature import se.lth.cs.util.Feature
import se.lth.cs.util.FeatureVisitor import se.lth.cs.util.FeatureVisitor
import java.lang.RuntimeException
class PAPICounter(val counter : String) : Feature() { class PAPICounter(val counter : String) : Feature() {
fun isValid(): Boolean { fun isValid(): Boolean {
...@@ -17,14 +16,14 @@ class PAPICounter(val counter : String) : Feature() { ...@@ -17,14 +16,14 @@ class PAPICounter(val counter : String) : Feature() {
Papi.init() Papi.init()
try { try {
val eventSet = EventSet.create(this.toPAPIConstant()!!) val eventSet = EventSet.create(this.toPAPIConstant()!!)
// eventSet.start() eventSet.start()
// var x = 0 var x = 0
// // Some random crap // Some random crap
// for (i in 0 until 10) { for (i in 0 until 10) {
// x += x * 2 - 3 x += x * 2 - 3
// } }
// eventSet.stop() eventSet.stop()
// eventSet.destroy() eventSet.destroy()
return true return true
} catch (e : PapiException) { } catch (e : PapiException) {
return false return false
......
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