I'm developing a chrome extension and I want to calculate this value(check screenshot) programmatically.
I've tried Performance API's methods but the values are different. I don't want to attach a debugger to a webpage or adding a custom dev panel
const transferSize = performance.getEntriesByType('resource').map(item => item.transferSize).reduce((total, item) => total + item);
const encodedBodySize= performance.getEntriesByType('resource').map(item => item.encodedBodySize).reduce((total, item) => total + item);
const decodedBodySize= performance.getEntriesByType('resource').map(item => item.decodedBodySize).reduce((total, item) => total + item);
