Fixed timing calculation, added perf stats