API to get memory of all processes of the app

This commit is contained in:
Hari Krishna Reddy Juturu 2017-04-17 04:59:16 -07:00
parent dafd0b6c3c
commit bef7d5a520
3 changed files with 65 additions and 1 deletions

View file

@ -760,6 +760,23 @@ Disables hardware acceleration for current app.
This method can only be called before app is ready.
### `app.getAppMemoryInfo()`
Returns `Object[]`:
* `pid` Integer - The process id for which memory info is collected for
* `workingSetSize` Integer - The amount of memory currently pinned to actual physical
RAM.
* `peakWorkingSetSize` Integer - The maximum amount of memory that has ever been pinned
to actual physical RAM.
* `privateBytes` Integer - The amount of memory not shared by other processes, such as
JS heap or HTML content.
* `sharedBytes` Integer - The amount of memory shared between processes, typically
memory consumed by the Electron code itself
Returns an object giving memory usage statistics about all the processes associated with
the app. Note that all statistics are reported in Kilobytes.
### `app.setBadgeCount(count)` _Linux_ _macOS_
* `count` Integer