react-perf-devtool
Advanced tools
Comparing version 3.0.0-beta0 to 3.0.0-beta1
{ | ||
"name": "react-perf-devtool", | ||
"version": "3.0.0-beta0", | ||
"version": "3.0.0-beta1", | ||
"description": | ||
@@ -5,0 +5,0 @@ "A chrome devtool extension for inspecting performance of React Components", |
@@ -40,3 +40,3 @@ const React = require('react') | ||
// Set the timer, and get the total measures and flush them if the store is empty. | ||
this.timer = setInterval(() => this.getMeasuresLength(), 2300) | ||
this.timer = setInterval(() => this.getMeasuresLength(), 2000) | ||
} | ||
@@ -92,2 +92,5 @@ | ||
} | ||
this.getRawMeasures() | ||
// Update the state. | ||
@@ -99,2 +102,17 @@ this.updateMeasures(JSON.parse(measures)) | ||
getRawMeasures = () => { | ||
chrome.devtools.inspectedWindow.eval( | ||
"JSON.stringify(__REACT_PERF_DEVTOOL_GLOBAL_STORE___.rawMeasures)", | ||
(measures, err) => { | ||
if (err) { | ||
this.updateErrorState() | ||
return | ||
} | ||
this.setState({ | ||
rawMeasures: JSON.parse(measures) | ||
}) | ||
} | ||
) | ||
} | ||
updateMeasures = measures => { | ||
@@ -108,3 +126,2 @@ store = store.concat(measures) | ||
.toFixed(2), | ||
rawMeasures: store, | ||
}) | ||
@@ -111,0 +128,0 @@ |
@@ -13,3 +13,4 @@ var getReactPerformanceData = require('../shared/parse') | ||
measures, | ||
length: list.getEntries().length | ||
length: list.getEntries().length, | ||
rawMeasures: list.getEntries() | ||
} | ||
@@ -16,0 +17,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40646
788