In a WinForms .NET application we use TrackFeatureStart/Stop to record total usage time and individual feature usages. As well as telling me about the performance of key features, this lets me calculate an overall "efficiency" metric, i.e. total feature time / total session time = efficiency. This technique captures some performance issues but not all, as often we have performance issues with something that we are not already measuring as a feature. Is there an approach that lets me hook into the WinForms API at a low level and record all time that the user is not facing a blinking cursor?
I propose that we use a stopwatch that I can start before all operations and then stop when the user has control again, reporting the total elapsed time at the end of the session using TrackFeatureValue. Is there a better way?