Lesson 19 of 28
javascriptPerformance Profiling – Chrome DevTools & Electron‑Performance
9 mins
Course progress68%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 19 of 28
javascript9 mins
Keep these ideas in mind as you work through the lesson.
performance.now() in your code to measure custom sections.const { performance } = require('perf_hooks');
const start = performance.now();
// … heavy work …
const duration = performance.now() - start;
console.log(`Main work took ${duration.toFixed(2)} ms`);
electron‑performance (third‑party)npm install electron-performance
const { monitor } = require('electron-performance');
monitor(app);
It logs CPU, memory and event‑loop lag.