This Component is based on Paul Irish's memory-stats.
yarn add react-memorystats
import { render } from 'react-dom';
import MemoryStatsComponent from 'react-memorystats';
render(
<MemoryStatsComponent corner="topLeft" />,
document.getElementById("container")
);
- corner - topLeft, topRight (default), bottomLeft, bottomRight
check the example code here.
# Linux
google-chrome --enable-precise-memory-info --enable-memory-info
#MacOS
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --enable-precise-memory-info --enable-memory-info
Otherwise the results from performance.memory are bucketed and less useful.
// install dependencies
yarn install
// run example locally and start server
yarn start