Moving the metrics incrementing out of the event loop (CPU profiling det...

...ermined this took non-negligible time)