{"action":"created","comment":{"url":"https://api.github.com/repos/nodejs/node/pulls/comments/289879670","pull_request_review_id":244924219,"id":289879670,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4OTg3OTY3MA==","diff_hunk":"@@ -1819,6 +1819,46 @@ process.report.writeReport();\n \n Additional documentation is available in the [report documentation][].\n \n+## process.resourcesUsage()\n+<!-- YAML\n+added: v12.x.x\n+-->\n+\n+* Returns: {Object}","path":"doc/api/process.md","position":9,"original_position":9,"commit_id":"3f0d72b14de4747be56866da4a5c20e6123c40fe","original_commit_id":"2eff3d1adce8214099592f12c718dfe8772b87fa","user":{"login":"bnoordhuis","id":275871,"node_id":"MDQ6VXNlcjI3NTg3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/275871?v=4","gravatar_id":"","url":"https://api.github.com/users/bnoordhuis","html_url":"https://github.com/bnoordhuis","followers_url":"https://api.github.com/users/bnoordhuis/followers","following_url":"https://api.github.com/users/bnoordhuis/following{/other_user}","gists_url":"https://api.github.com/users/bnoordhuis/gists{/gist_id}","starred_url":"https://api.github.com/users/bnoordhuis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnoordhuis/subscriptions","organizations_url":"https://api.github.com/users/bnoordhuis/orgs","repos_url":"https://api.github.com/users/bnoordhuis/repos","events_url":"https://api.github.com/users/bnoordhuis/events{/privacy}","received_events_url":"https://api.github.com/users/bnoordhuis/received_events","type":"User","site_admin":false},"body":"I have a mild preference for exposing the fields as-is, supported or not, duplicating other APIs or not.\r\n\r\nIf that obsoletes `process.cpuUsage()`, then so be it. You could reimplement it as a JS-only shim around `process.resourceUsage()`.\r\n\r\n(`process.memoryUsage()` still has merit because it also reports the V8 heap size.)","created_at":"2019-06-03T14:41:43Z","updated_at":"2019-06-03T14:43:54Z","html_url":"https://github.com/nodejs/node/pull/28018#discussion_r289879670","pull_request_url":"https://api.github.com/repos/nodejs/node/pulls/28018","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments/289879670"},"html":{"href":"https://github.com/nodejs/node/pull/28018#discussion_r289879670"},"pull_request":{"href":"https://api.github.com/repos/nodejs/node/pulls/28018"}},"in_reply_to_id":289659237},"pull_request":{"url":"https://api.github.com/repos/nodejs/node/pulls/28018","id":284335993,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg0MzM1OTkz","html_url":"https://github.com/nodejs/node/pull/28018","diff_url":"https://github.com/nodejs/node/pull/28018.diff","patch_url":"https://github.com/nodejs/node/pull/28018.patch","issue_url":"https://api.github.com/repos/nodejs/node/issues/28018","number":28018,"state":"open","locked":false,"title":"process: expose uv_rusage on process.resourcesUsage()","user":{"login":"vmarchaud","id":2820968,"node_id":"MDQ6VXNlcjI4MjA5Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/2820968?v=4","gravatar_id":"","url":"https://api.github.com/users/vmarchaud","html_url":"https://github.com/vmarchaud","followers_url":"https://api.github.com/users/vmarchaud/followers","following_url":"https://api.github.com/users/vmarchaud/following{/other_user}","gists_url":"https://api.github.com/users/vmarchaud/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarchaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarchaud/subscriptions","organizations_url":"https://api.github.com/users/vmarchaud/orgs","repos_url":"https://api.github.com/users/vmarchaud/repos","events_url":"https://api.github.com/users/vmarchaud/events{/privacy}","received_events_url":"https://api.github.com/users/vmarchaud/received_events","type":"User","site_admin":false},"body":"As discussed in https://github.com/nodejs/diagnostics/issues/161,\r\nthe core should expose important metrics about the runtime, this PR's\r\ngoal is to let user get the number of io request made, and lower level\r\nmetrics like the page faults and context switches.\r\n\r\nThe `make -j4 test` are not passing locally because of a failing test `test/parallel/test-worker-prof.js` but i believe it's not related to my changes.\r\nConcerning the tests, i didn't really tested the output of the function mainly because it might make the test flaky depending on the platform and runtime behavior.\r\n\r\nThis is my first PR on the core, so i might have forgotten some requirements.\r\n\r\n##### Checklist\r\n<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->\r\n\r\n- [ ] `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes\r\n- [X] tests and/or benchmarks are included\r\n- [X] documentation is changed or added\r\n- [X] commit message follows [commit guidelines](https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-message-guidelines)\r\n","created_at":"2019-06-02T11:43:05Z","updated_at":"2019-06-03T14:43:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0549905afe07f196597376a3d02788e461cf308a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":155267502,"node_id":"MDU6TGFiZWwxNTUyNjc1MDI=","url":"https://api.github.com/repos/nodejs/node/labels/C++","name":"C++","color":"e11d21","default":false},{"id":207521371,"node_id":"MDU6TGFiZWwyMDc1MjEzNzE=","url":"https://api.github.com/repos/nodejs/node/labels/process","name":"process","color":"00aaff","default":false},{"id":169485478,"node_id":"MDU6TGFiZWwxNjk0ODU0Nzg=","url":"https://api.github.com/repos/nodejs/node/labels/semver-minor","name":"semver-minor","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nodejs/node/pulls/28018/commits","review_comments_url":"https://api.github.com/repos/nodejs/node/pulls/28018/comments","review_comment_url":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nodejs/node/issues/28018/comments","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/3f0d72b14de4747be56866da4a5c20e6123c40fe","head":{"label":"vmarchaud:resources-usage","ref":"resources-usage","sha":"3f0d72b14de4747be56866da4a5c20e6123c40fe","user":{"login":"vmarchaud","id":2820968,"node_id":"MDQ6VXNlcjI4MjA5Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/2820968?v=4","gravatar_id":"","url":"https://api.github.com/users/vmarchaud","html_url":"https://github.com/vmarchaud","followers_url":"https://api.github.com/users/vmarchaud/followers","following_url":"https://api.github.com/users/vmarchaud/following{/other_user}","gists_url":"https://api.github.com/users/vmarchaud/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarchaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarchaud/subscriptions","organizations_url":"https://api.github.com/users/vmarchaud/orgs","repos_url":"https://api.github.com/users/vmarchaud/repos","events_url":"https://api.github.com/users/vmarchaud/events{/privacy}","received_events_url":"https://api.github.com/users/vmarchaud/received_events","type":"User","site_admin":false},"repo":{"id":188383686,"node_id":"MDEwOlJlcG9zaXRvcnkxODgzODM2ODY=","name":"node","full_name":"vmarchaud/node","private":false,"owner":{"login":"vmarchaud","id":2820968,"node_id":"MDQ6VXNlcjI4MjA5Njg=","avatar_url":"https://avatars3.githubusercontent.com/u/2820968?v=4","gravatar_id":"","url":"https://api.github.com/users/vmarchaud","html_url":"https://github.com/vmarchaud","followers_url":"https://api.github.com/users/vmarchaud/followers","following_url":"https://api.github.com/users/vmarchaud/following{/other_user}","gists_url":"https://api.github.com/users/vmarchaud/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarchaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarchaud/subscriptions","organizations_url":"https://api.github.com/users/vmarchaud/orgs","repos_url":"https://api.github.com/users/vmarchaud/repos","events_url":"https://api.github.com/users/vmarchaud/events{/privacy}","received_events_url":"https://api.github.com/users/vmarchaud/received_events","type":"User","site_admin":false},"html_url":"https://github.com/vmarchaud/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":true,"url":"https://api.github.com/repos/vmarchaud/node","forks_url":"https://api.github.com/repos/vmarchaud/node/forks","keys_url":"https://api.github.com/repos/vmarchaud/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vmarchaud/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vmarchaud/node/teams","hooks_url":"https://api.github.com/repos/vmarchaud/node/hooks","issue_events_url":"https://api.github.com/repos/vmarchaud/node/issues/events{/number}","events_url":"https://api.github.com/repos/vmarchaud/node/events","assignees_url":"https://api.github.com/repos/vmarchaud/node/assignees{/user}","branches_url":"https://api.github.com/repos/vmarchaud/node/branches{/branch}","tags_url":"https://api.github.com/repos/vmarchaud/node/tags","blobs_url":"https://api.github.com/repos/vmarchaud/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vmarchaud/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vmarchaud/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/vmarchaud/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vmarchaud/node/statuses/{sha}","languages_url":"https://api.github.com/repos/vmarchaud/node/languages","stargazers_url":"https://api.github.com/repos/vmarchaud/node/stargazers","contributors_url":"https://api.github.com/repos/vmarchaud/node/contributors","subscribers_url":"https://api.github.com/repos/vmarchaud/node/subscribers","subscription_url":"https://api.github.com/repos/vmarchaud/node/subscription","commits_url":"https://api.github.com/repos/vmarchaud/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/vmarchaud/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/vmarchaud/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/vmarchaud/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/vmarchaud/node/contents/{+path}","compare_url":"https://api.github.com/repos/vmarchaud/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vmarchaud/node/merges","archive_url":"https://api.github.com/repos/vmarchaud/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vmarchaud/node/downloads","issues_url":"https://api.github.com/repos/vmarchaud/node/issues{/number}","pulls_url":"https://api.github.com/repos/vmarchaud/node/pulls{/number}","milestones_url":"https://api.github.com/repos/vmarchaud/node/milestones{/number}","notifications_url":"https://api.github.com/repos/vmarchaud/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vmarchaud/node/labels{/name}","releases_url":"https://api.github.com/repos/vmarchaud/node/releases{/id}","deployments_url":"https://api.github.com/repos/vmarchaud/node/deployments","created_at":"2019-05-24T08:28:17Z","updated_at":"2019-06-02T09:34:08Z","pushed_at":"2019-06-03T11:31:15Z","git_url":"git://github.com/vmarchaud/node.git","ssh_url":"git@github.com:vmarchaud/node.git","clone_url":"https://github.com/vmarchaud/node.git","svn_url":"https://github.com/vmarchaud/node","homepage":"https://nodejs.org/","size":470920,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nodejs:master","ref":"master","sha":"7e18c650de419ae98511be3c7bc54b34efc6d3d4","user":{"login":"nodejs","id":9950313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTAzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"repo":{"id":27193779,"node_id":"MDEwOlJlcG9zaXRvcnkyNzE5Mzc3OQ==","name":"node","full_name":"nodejs/node","private":false,"owner":{"login":"nodejs","id":9950313,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk5NTAzMTM=","avatar_url":"https://avatars3.githubusercontent.com/u/9950313?v=4","gravatar_id":"","url":"https://api.github.com/users/nodejs","html_url":"https://github.com/nodejs","followers_url":"https://api.github.com/users/nodejs/followers","following_url":"https://api.github.com/users/nodejs/following{/other_user}","gists_url":"https://api.github.com/users/nodejs/gists{/gist_id}","starred_url":"https://api.github.com/users/nodejs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nodejs/subscriptions","organizations_url":"https://api.github.com/users/nodejs/orgs","repos_url":"https://api.github.com/users/nodejs/repos","events_url":"https://api.github.com/users/nodejs/events{/privacy}","received_events_url":"https://api.github.com/users/nodejs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nodejs/node","description":"Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:","fork":false,"url":"https://api.github.com/repos/nodejs/node","forks_url":"https://api.github.com/repos/nodejs/node/forks","keys_url":"https://api.github.com/repos/nodejs/node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nodejs/node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nodejs/node/teams","hooks_url":"https://api.github.com/repos/nodejs/node/hooks","issue_events_url":"https://api.github.com/repos/nodejs/node/issues/events{/number}","events_url":"https://api.github.com/repos/nodejs/node/events","assignees_url":"https://api.github.com/repos/nodejs/node/assignees{/user}","branches_url":"https://api.github.com/repos/nodejs/node/branches{/branch}","tags_url":"https://api.github.com/repos/nodejs/node/tags","blobs_url":"https://api.github.com/repos/nodejs/node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nodejs/node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nodejs/node/git/refs{/sha}","trees_url":"https://api.github.com/repos/nodejs/node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nodejs/node/statuses/{sha}","languages_url":"https://api.github.com/repos/nodejs/node/languages","stargazers_url":"https://api.github.com/repos/nodejs/node/stargazers","contributors_url":"https://api.github.com/repos/nodejs/node/contributors","subscribers_url":"https://api.github.com/repos/nodejs/node/subscribers","subscription_url":"https://api.github.com/repos/nodejs/node/subscription","commits_url":"https://api.github.com/repos/nodejs/node/commits{/sha}","git_commits_url":"https://api.github.com/repos/nodejs/node/git/commits{/sha}","comments_url":"https://api.github.com/repos/nodejs/node/comments{/number}","issue_comment_url":"https://api.github.com/repos/nodejs/node/issues/comments{/number}","contents_url":"https://api.github.com/repos/nodejs/node/contents/{+path}","compare_url":"https://api.github.com/repos/nodejs/node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nodejs/node/merges","archive_url":"https://api.github.com/repos/nodejs/node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nodejs/node/downloads","issues_url":"https://api.github.com/repos/nodejs/node/issues{/number}","pulls_url":"https://api.github.com/repos/nodejs/node/pulls{/number}","milestones_url":"https://api.github.com/repos/nodejs/node/milestones{/number}","notifications_url":"https://api.github.com/repos/nodejs/node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nodejs/node/labels{/name}","releases_url":"https://api.github.com/repos/nodejs/node/releases{/id}","deployments_url":"https://api.github.com/repos/nodejs/node/deployments","created_at":"2014-11-26T19:57:11Z","updated_at":"2019-06-03T13:51:22Z","pushed_at":"2019-06-03T14:39:52Z","git_url":"git://github.com/nodejs/node.git","ssh_url":"git@github.com:nodejs/node.git","clone_url":"https://github.com/nodejs/node.git","svn_url":"https://github.com/nodejs/node","homepage":"https://nodejs.org/","size":473440,"stargazers_count":61748,"watchers_count":61748,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13826,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":933,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":13826,"open_issues":933,"watchers":61748,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nodejs/node/pulls/28018"},"html":{"href":"https://github.com/nodejs/node/pull/28018"},"issue":{"href":"https://api.github.com/repos/nodejs/node/issues/28018"},"comments":{"href":"https://api.github.com/repos/nodejs/node/issues/28018/comments"},"review_comments":{"href":"https://api.github.com/repos/nodejs/node/pulls/28018/comments"},"review_comment":{"href":"https://api.github.com/repos/nodejs/node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nodejs/node/pulls/28018/commits"},"statuses":{"href":"https://api.github.com/repos/nodejs/node/statuses/3f0d72b14de4747be56866da4a5c20e6123c40fe"}},"author_association":"NONE"}}
{"actor":{"display_login":"bnoordhuis"}}