How to use the react-addons-perf.getLastMeasurements function in react-addons-perf

To help you get started, we’ve selected a few react-addons-perf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mui-org / material-ui / test / integration / fixtures / perf / TimeWaster.js View on Github external
endTest() {
    const measurements = Perf.getLastMeasurements();
    const wasted = Perf.getWasted(measurements);

    const summary = {};

    summary.hasWastedTime = component => {
      const result = find(wasted, n => n.key.indexOf(`> ${component}`));
      if (result) {
        return (
          `${result.key} wasted ${result.inclusiveRenderDuration}ms ` +
          `across ${result.renderCount} renders`
        );
      }
      return false;
    };

    return this.props.onComplete(summary);
github department-of-veterans-affairs / vets-website / src / js / edu-benefits / 1990 / components / debug / PerfPanel.jsx View on Github external
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);
  }
github freedomexio / rocketx-condenser / app / utils / ConsoleExports.js View on Github external
perf: () => {
        const Perf = require('react-addons-perf')
        if (perfStarted) {
            Perf.stop()
            const lm = Perf.getLastMeasurements()
            Perf.printInclusive(lm)
            Perf.printExclusive(lm)
            Perf.printWasted(lm)
            perfStarted = false
        } else {
            Perf.start()
            perfStarted = true
        }
        return Perf
    },
github freedomexio / rocketx-condenser / src / app / utils / ConsoleExports.js View on Github external
perf: () => {
        const Perf = require('react-addons-perf')
        if (perfStarted) {
            Perf.stop()
            const lm = Perf.getLastMeasurements()
            Perf.printInclusive(lm)
            Perf.printExclusive(lm)
            Perf.printWasted(lm)
            perfStarted = false
        } else {
            Perf.start()
            perfStarted = true
        }
        return Perf
    },
github matt-deboer / kuill / pkg / ui / src / components / access / ResourcesTab.js View on Github external
componentDidUpdate = () => {
    Perf.stop()
    let m = Perf.getLastMeasurements()
    Perf.printWasted(m)

    if (!this.state.actionsOpen) {
      this.actionsClicked = false
    }
  }
github strues / boldr / src / components / PerfProfiler / PerfProfiler.js View on Github external
printWasted = () => {
    const lastMeasurements = Perf.getLastMeasurements();

    Perf.printWasted(lastMeasurements);
  };
github strues / boldr / src / shared / components / PerfProfiler / PerfProfiler.js View on Github external
printOperations = () => {
    const lastMeasurements = Perf.getLastMeasurements();

    Perf.printOperations(lastMeasurements);
  };
github strues / boldr / src / shared / components / PerfProfiler / PerfProfiler.js View on Github external
printWasted = () => {
    const lastMeasurements = Perf.getLastMeasurements();

    Perf.printWasted(lastMeasurements);
  };
github ssrwpo / ssr / demo / imports / ui / hoc / perf.jsx View on Github external
setTimeout(() => {
        Perf.stop();
        const measures = Perf.getLastMeasurements();
        Perf.printWasted(measures);
        Perf.printOperations(measures);
      }, 0);
    }
github searchkit / searchkit-demo / src / app / src / playground / PlaygroundApp.tsx View on Github external
this.forceUpdate(() => {
      Perf.stop()
      Perf.printWasted(Perf.getLastMeasurements())
    })
  }