Electrom is a resource management solution for Electron applications, which is convenient for performance management and friendly debugging of multiple windows.
xudafeng | yantze | z0gSh1u | sriting | snapre | WynterDing |
|---|
This project follows the git-contributor spec, auto updated at Thu Jun 05 2025 11:33:16 GMT+0800.
npm i electrom --save-devPlease visit the demo code
// main process: import electromimport{EVENT_DATA_CHANNEL_NAME,BROWSER_WINDOW_PRELOAD_PATH,Monitor,}from'electrom';constmonitor=newMonitor();/** * Please set this script's path as `webPreferences.preload` of `BrowserWindow`. * { * preload: BROWSER_WINDOW_PRELOAD_PATH * } */mainWindow.webContents.on('dom-ready',()=>{monitor.on(EVENT_DATA_CHANNEL_NAME,(data: any)=>{mainWindow.webContents.send(EVENT_DATA_CHANNEL_NAME,data);});monitor.bindEventToWindow(mainWindow);monitor.start();});You can use the Perf-Board standalone in your front-end.
importReactfrom'react';importPerfBoardfrom'electrom/src/PerfBoard';function(){return(<PerfBoard/>);}- heapdump
The MIT License (MIT)
