mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Updated the Performance tools doc page.
Now it’s possible to read the page from top to the bottom without asking oneself “Ok, but how do I get these measurements?”
This commit is contained in:
@@ -21,6 +21,8 @@ The `Perf` object documented here is exposed as `React.addons.Perf` when using t
|
|||||||
### `Perf.start()` and `Perf.stop()`
|
### `Perf.start()` and `Perf.stop()`
|
||||||
Start/stop the measurement. The React operations in-between are recorded for analyses below. Operations that took an insignificant amount of time are ignored.
|
Start/stop the measurement. The React operations in-between are recorded for analyses below. Operations that took an insignificant amount of time are ignored.
|
||||||
|
|
||||||
|
After stopping, you will need `Perf.getLastMeasurements()` (described below) to get the measurements.
|
||||||
|
|
||||||
### `Perf.printInclusive(measurements)`
|
### `Perf.printInclusive(measurements)`
|
||||||
Prints the overall time taken. If no argument's passed, defaults to all the measurements from the last recording. This prints a nicely formatted table in the console, like so:
|
Prints the overall time taken. If no argument's passed, defaults to all the measurements from the last recording. This prints a nicely formatted table in the console, like so:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user