Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/electron-modules/electrom
Electrom is a resource management solution for Electron applications, which is convenient for performance management and friendly debugging of multiple windows.
https://github.com/electron-modules/electrom
electron monitor process-manager
Last synced: 2 months ago
JSON representation
Electrom is a resource management solution for Electron applications, which is convenient for performance management and friendly debugging of multiple windows.
- Host: GitHub
- URL: https://github.com/electron-modules/electrom
- Owner: electron-modules
- Created: 2020-11-22T08:48:59.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T14:47:03.000Z (almost 2 years ago)
- Last Synced: 2024-11-11T21:20:59.587Z (3 months ago)
- Topics: electron, monitor, process-manager
- Language: TypeScript
- Homepage:
- Size: 2.77 MB
- Stars: 30
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# electrom
[![NPM version][npm-image]][npm-url]
[![CI][CI-image]][CI-url]
[![Test coverage][codecov-image]][codecov-url]
[![node version][node-image]][node-url]
[![npm download][download-image]][download-url][npm-image]: https://img.shields.io/npm/v/electrom.svg
[npm-url]: https://npmjs.org/package/electrom
[CI-image]: https://github.com/electron-modules/electrom/actions/workflows/ci.yml/badge.svg
[CI-url]: https://github.com/electron-modules/electrom/actions/workflows/ci.yml
[codecov-image]: https://img.shields.io/codecov/c/github/electron-modules/electrom.svg?logo=codecov
[codecov-url]: https://codecov.io/gh/electron-modules/electrom
[node-image]: https://img.shields.io/badge/node.js-%3E=_8-green.svg
[node-url]: http://nodejs.org/download/
[download-image]: https://img.shields.io/npm/dm/electrom.svg
[download-url]: https://npmjs.org/package/electrom> Electrom is a resource management solution for Electron applications, which is convenient for performance management and friendly debugging of multiple windows.
![](./demo.gif)
## Contributors
|[
xudafeng](https://github.com/xudafeng)
|[
yantze](https://github.com/yantze)
|[
sriting](https://github.com/sriting)
|[
snapre](https://github.com/snapre)
|
| :---: | :---: | :---: | :---: |This project follows the git-contributor [spec](https://github.com/xudafeng/git-contributor), auto updated at `Tue May 03 2022 11:32:04 GMT+0800`.
## Installment
```shell
npm i electrom --save-dev
```## How to use
Please visit the demo code
- [./example/main.ts](./example/main.ts)
- [electron-modules/electron-windows/blob/master/app/electrom.js](https://github.com/electron-modules/electron-windows/blob/master/app/electrom.js)```typescript
// main process: import electrom
import {
EVENT_DATA_CHANNEL_NAME,
BROWSER_WINDOW_PRELOAD_PATH,
Monitor,
} from 'electrom';const monitor = new Monitor();
/**
* 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();
});
```## Perf Board
You can use the Perf-Board standalone in your front-end.
```javascript
import React from 'react';
import PerfBoard from 'electrom/src/PerfBoard';function() {
return (
);
}
```## TODO
- [ ] heapdump
## License
The MIT License (MIT)