Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting CPU usage per Process of Chrome

I developed a Chrome-Extension and want to know if it is possible to get CPU usage of any tab in Chrome (please see the image)? I saw a few questions which are very old. Maybe there is some new techniques to get the CPU usage for each tab.

enter image description here

like image 291
Micheal Toru Avatar asked Feb 06 '18 09:02

Micheal Toru


1 Answers

It is possible. You need to request the permission: "processes" first in your manifest.json with something like:

{
  "name": "My extension...",
  ...
  "permissions": [ "processes" ],
  ...
}

If you are on dev-channel you'll have chrome.processes available. On other channels the extensions will be rejected with an error saying:

'processes' requires dev channel or newer, but this is the stable channel.

chrome.processes in dev tools

like image 107
Christopher Avatar answered Nov 18 '22 02:11

Christopher