New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API to get memory of all processes of the app #9214

Merged
merged 11 commits into from May 4, 2017

Conversation

Projects
None yet
7 participants
@juturu
Contributor

juturu commented Apr 17, 2017

Adding api which will help apps to get memory info for all processes.

@juturu juturu requested review from zcbenz, kevinsawicki and deepak1556 Apr 17, 2017

Show outdated Hide outdated atom/browser/api/atom_api_app.h
Show outdated Hide outdated atom/browser/api/atom_api_app.cc
Show outdated Hide outdated docs/api/app.md
@paulcbetts

This comment has been minimized.

Show comment
Hide comment
@paulcbetts
Contributor

paulcbetts commented Apr 18, 2017

@poiru poiru referenced this pull request Apr 18, 2017

Merged

Add OS pid to web-contents #9222

2 of 2 tasks complete
Show outdated Hide outdated docs/api/app.md

@zcbenz zcbenz self-assigned this Apr 25, 2017

@kevinsawicki

Left a few minor comments

Show outdated Hide outdated atom/browser/api/atom_api_app.cc
@@ -760,6 +760,23 @@ Disables hardware acceleration for current app.
This method can only be called before app is ready.
### `app.getAppMemoryInfo()`

This comment has been minimized.

@kevinsawicki

kevinsawicki Apr 25, 2017

Contributor

I think we should add a spec for this.

@kevinsawicki

kevinsawicki Apr 25, 2017

Contributor

I think we should add a spec for this.

Show outdated Hide outdated atom/browser/api/atom_api_app.h
@juturu

This comment has been minimized.

Show comment
Hide comment
@juturu

juturu Apr 27, 2017

Contributor

@MarshallOfSound @poiru @kevinsawicki made the changes requested and fixed other spec issues. Please take a look.
@alexstrat this returns memory info of all the process corresponding to the app. You can iterate over the array to get the memory info for the pid you are interested in. Does that help?
@paulcbetts yes it is similar for the part of memory retrieve from a process. We can unify it. Any suggestion on where the utility method could go to?

Contributor

juturu commented Apr 27, 2017

@MarshallOfSound @poiru @kevinsawicki made the changes requested and fixed other spec issues. Please take a look.
@alexstrat this returns memory info of all the process corresponding to the app. You can iterate over the array to get the memory info for the pid you are interested in. Does that help?
@paulcbetts yes it is similar for the part of memory retrieve from a process. We can unify it. Any suggestion on where the utility method could go to?

@juturu

This comment has been minimized.

Show comment
Hide comment
@juturu

juturu May 3, 2017

Contributor

@zcbenz anything blocking in merging this PR?

Contributor

juturu commented May 3, 2017

@zcbenz anything blocking in merging this PR?

kevinsawicki and others added some commits May 4, 2017

@kevinsawicki kevinsawicki merged commit 5951135 into master May 4, 2017

5 of 9 checks passed

electron-linux-x64 Build #6495508 failed in 155s
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
electron-win-x64 Build #3049 in progress...
Details
electron-linux-arm Build #6495506 succeeded in 74s
Details
electron-linux-ia32 Build #6495507 succeeded in 68s
Details
electron-mas-x64 Build #4090 succeeded in 8 min 28 sec
Details
electron-osx-x64 Build #4092 succeeded in 8 min 15 sec
Details
electron-win-ia32 Build #3075 succeeded in 9 min 10 sec
Details

@kevinsawicki kevinsawicki deleted the app-memoryinfo branch May 4, 2017

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki May 4, 2017

Contributor

Thanks for this @juturu 👍 🚢

Contributor

kevinsawicki commented May 4, 2017

Thanks for this @juturu 👍 🚢

@alexstrat

This comment has been minimized.

Show comment
Hide comment
@alexstrat

alexstrat May 15, 2017

Contributor

@juturu app.getAppMemoryInfo actually returns the actual OS process id as pid, and on webContents there is no method (documented or undocumented) to get the actual OS process id. Therefore I don't see a way to make a link between a webContents and the associated process memory metrics coming from getAppMemoryInfo => FUP in #9222

Contributor

alexstrat commented May 15, 2017

@juturu app.getAppMemoryInfo actually returns the actual OS process id as pid, and on webContents there is no method (documented or undocumented) to get the actual OS process id. Therefore I don't see a way to make a link between a webContents and the associated process memory metrics coming from getAppMemoryInfo => FUP in #9222

@juturu

This comment has been minimized.

Show comment
Hide comment
@juturu

juturu May 16, 2017

Contributor

@alexstrat please look at #9486 to see if that help with what you want to achieve.

Contributor

juturu commented May 16, 2017

@alexstrat please look at #9486 to see if that help with what you want to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment