From 30dc842e346cad7879b7b2ac1cf6f0c1c9234357 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 4 Apr 2016 16:29:53 +0100 Subject: [PATCH] Clarify that ReactPerf.getLastMeasurements() is now opaque --- docs/docs/10.9-perf.md | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/docs/docs/10.9-perf.md b/docs/docs/10.9-perf.md index 1e66f48a21ae3..8b8da062584a0 100644 --- a/docs/docs/10.9-perf.md +++ b/docs/docs/10.9-perf.md @@ -57,24 +57,6 @@ This method has been renamed to `printOperations()` which is described in the pr The above print methods use `Perf.getLastMeasurements()` to pretty-print the result. ### `Perf.getLastMeasurements()` -Get the measurements array from the last start-stop session. The array contains objects, each of which looks like this: - -```js -{ - // The term "inclusive" and "exclusive" are explained below - "exclusive": {}, - // '.0.0' is the React ID of the node - "inclusive": {".0.0": 0.0670000008540228, ".0": 0.3259999939473346}, - "render": {".0": 0.036999990697950125, ".0.0": 0.010000003385357559}, - // Number of instances - "counts": {".0": 1, ".0.0": 1}, - // DOM touches - "writes": {}, - // Extra debugging info - "displayNames": { - ".0": {"current": "App", "owner": ""}, - ".0.0": {"current": "Box", "owner": "App"} - }, - "totalTime": 0.48499999684281647 -} -``` +Get the opaque data structure describing measurements from the last start-stop session. You can save it and pass it to the methods above to analyze past measurements. + +Don't rely on the exact format of the return value because it may change in minor releases. We will update the documentation if the return value format becomes a supported part of the public API.