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