Clean profiler data at the end of session run

This commit is contained in:
Fedor Isakov 2016-02-24 14:55:15 +01:00
parent 6cfa569663
commit 286fa4c5e6
2 changed files with 5 additions and 0 deletions

View File

@ -60,6 +60,7 @@ class MemEvaluationSession : EvaluationSession {
finally {
ourBackend.ourSession.set(null)
profiler?.formattedData()?.entries?.forEach { e -> durations?.put(e.key, e.value) }
profiler?.clear()
}
return session

View File

@ -46,6 +46,10 @@ class Profiler {
}.toMap()
}
fun clear() {
tokenStack.clear()
}
}
class Token(val name: String, val id: Int) {