Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
handleStop() {
Perf.stop();
const measurements = Perf.getLastMeasurements();
console.log('Inclusive');
Perf.printInclusive(measurements);
console.log('Exclusive');
Perf.printExclusive(measurements);
console.log('Wasted');
Perf.printWasted(measurements);
console.log('DOM');
Perf.printOperations(measurements);
}
printOperations = () => {
const lastMeasurements = Perf.getLastMeasurements();
Perf.printOperations(lastMeasurements);
};
stopPerf() {
this.setState({
idle: true
});
Perf.stop();
Perf.printOperations();
Perf.printWasted();
}
setTimeout(() => {
Perf.stop();
const measures = Perf.getLastMeasurements();
Perf.printWasted(measures);
Perf.printOperations(measures);
}, 0);
}
printOperations = () => {
const lastMeasurements = Perf.getLastMeasurements();
Perf.printOperations(lastMeasurements);
};