rnikhil275
rnikhil275

Reputation: 406

How to know each TAB data usage in Chrome?

Is it possible to know the data/bandwidth usage of each tab opened ?. Is there any API for this ?.

I want to make a chrome extension based on this. Any pointers would be helpful.

What I exactly want to do is: Show a small counter beside the tab name/page title. The counter should update itself every 5-10 seconds. It should show the amount of data/bandwidth consumed by the tab.

chrome://net-internals/#export.

This shows the overall bandwidth usage once the event starts ? Can I get this tab wise ?. Any API for this ?.

Is this possible in Chrome ?. I found this in Firefox as an add-on(tab-data).
Link: https://addons.mozilla.org/en-us/firefox/addon/tab-data/

Upvotes: 7

Views: 4668

Answers (1)

Phate01
Phate01

Reputation: 1795

Chrome API says that you can use chrome.processes.getProcessIdForTab(integer tabId, function callback) to get the process id of the tab, and then getProcessInfo − chrome.processes.getProcessInfo(integer or array of integer processIds, boolean includeMemory, function callback) to get the memory usage and other stuff. Look at the link for more detailed info

Here there's a question on this topic: Programmatically get memory usage in Chrome

Upvotes: 1

Related Questions