GlobalPerformanceLogger.js 847 B

12345678910111213141516171819202122232425
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @flow strict-local
  8. * @format
  9. */
  10. 'use strict';
  11. const createPerformanceLogger = require('./createPerformanceLogger');
  12. import type {IPerformanceLogger} from './createPerformanceLogger';
  13. /**
  14. * This is a global shared instance of IPerformanceLogger that is created with
  15. * createPerformanceLogger().
  16. * This logger should be used only for global performance metrics like the ones
  17. * that are logged during loading bundle. If you want to log something from your
  18. * React component you should use PerformanceLoggerContext instead.
  19. */
  20. const GlobalPerformanceLogger: IPerformanceLogger = createPerformanceLogger();
  21. module.exports = GlobalPerformanceLogger;