Javascript
Javascript 코드 실행 시간 확인하기
yemsu
2021. 4. 15. 17:22
function someMethodIThinkMightBeSlow() {
const startTime = performance.now();
// Do the normal stuff for this function
const duration = performance.now() - startTime;
console.log(`someMethodIThinkMightBeSlow took ${duration}ms`);
}
참고 url
stackoverflow.com/questions/41218507/violation-long-running-javascript-task-took-xx-ms