Added a way to measure how long blocks of code take to run and record metrics on the average time taken.
Added message processing and room message sending average execution time metrics.