Performance counter changes (WIP)

(the idea is that the context represents a unit of work pattern where you create it when you need to do something and then you get rid of it).