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);
}
componentDidUpdate = () => {
Perf.stop()
let m = Perf.getLastMeasurements()
Perf.printWasted(m)
if (!this.state.actionsOpen) {
this.actionsClicked = false
}
}
handleStopClick = () => {
Perf.stop();
Perf.printWasted(Perf.getLastMeasurements());
}
export const reactPerformance = () => next => action => {
Perf.start();
const result = next(action);
Perf.stop();
Perf.printWasted();
return result;
};
setTimeout(() => {
Perf.stop();
const measures = Perf.getLastMeasurements();
Perf.printWasted(measures);
Perf.printOperations(measures);
}, 0);
}
componentDidMount: function() {
if (this.props.flux.stores.config.debug && Perf) {
var measurements = Perf.stop();
Perf.printInclusive(measurements);
utils.debug("Inclusive", "^");
Perf.printExclusive(measurements);
utils.debug("Exclusive", "^");
Perf.printWasted(measurements);
utils.debug("Wasted", "^");
}
},
componentDidUpdate = () => {
Perf.stop()
let m = Perf.getLastMeasurements()
Perf.printWasted(m)
}
printWasted = () => {
const lastMeasurements = Perf.getLastMeasurements();
Perf.printWasted(lastMeasurements);
};
componentDidUpdate = () => {
Perf.stop()
let m = Perf.getLastMeasurements()
Perf.printWasted(m)
}
printWasted = () => {
const lastMeasurements = Perf.getLastMeasurements();
Perf.printWasted(lastMeasurements);
};