UNPKG

react-automation-profiler

Version:

Automated React profiling and data visualization using React's Profiler API, Puppeteer, and D3.

19 lines 584 B
import React from 'react'; function handleRender(id, phase, actualDuration, baseDuration, startTime, commitTime, interactions) { if (!window.profiler) window.profiler = []; window.profiler.push({ actualDuration, baseDuration, commitTime, id, interactions, phase, startTime, }); } function AutomationProfiler({ children, id, }) { return (React.createElement(React.Profiler, { id: id, onRender: handleRender }, children)); } export default AutomationProfiler; //# sourceMappingURL=AutomationProfiler.js.map