Reputation: 406
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
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