performance.mark("name")
performance.getMarks()
performance.measure("name", "startMark", "endMark")
performance.getMeasures()
Important: Debugging impacts performance and is turned on when you open F12.