Add benchmark function

Added ```window.debug.benchmark```