Skip to content

Instantly share code, notes, and snippets.

@davidszotten
Created August 16, 2016 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidszotten/5535eb5ff98b68cae9791edd9bc0e1bf to your computer and use it in GitHub Desktop.
Save davidszotten/5535eb5ff98b68cae9791edd9bc0e1bf to your computer and use it in GitHub Desktop.
React profiling bookmarklet
(function() {
var Perf = React.addons.Perf;
var is_active = window.reactProfileActive || false;
if (!is_active) {
Perf.start();
}
else {
Perf.start();
measurements = Perf.getLastMeasurements();
Perf.printInclusive(measurements);
Perf.printWasted(measurements);
window.reactMeasurements = measurements;
}
window.reactProfileActive = !is_active;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment