performance 🧪
此 API 目前仅在 React Native 的 Canary 和 Experimental 渠道中可用。
¥This API is currently only available in React Native’s Canary and Experimental channels.
如果你想尝试,请在你的应用中使用 启用 Canary 版本通道。
¥If you want to try it out, please enable the Canary Channel in your app.
全局 performance
对象,如 Web 规范中定义。
¥The global performance
object, as defined in Web specifications.
参考
¥Reference
实例属性
¥Instance properties
eventCounts
参见 MDN 中的文档。
¥See documentation in MDN.
memory
参见 MDN 中的文档。
¥See documentation in MDN.
rnStartupTiming
⚠️
这是 React Native 特有的扩展。
¥This is a React Native specific extension.
提供有关应用启动时间的信息。
¥Provides information about the startup time of the application.
get rnStartupTiming(): ReactNativeStartupTiming;
ReactNativeStartupTiming
接口提供以下字段:
¥The ReactNativeStartupTiming
interface provides the following fields:
名称 | 类型 | 描述 |
---|---|---|
startTime | 数字 | void | React Native 运行时初始化启动时。 |
executeJavaScriptBundleEntryPointStart | 数字 | void | 应用包开始执行时。 |
endTime | 数字 | void | React Native 运行时完全初始化时。 |
timeOrigin
提供从 UNIX 纪元到系统启动的毫秒数,而不是从 UNIX 纪元到应用启动的毫秒数。
¥Provides the number of milliseconds from the UNIX epoch until system boot, instead of the number of milliseconds from the UNIX epoch until app startup.
参见 MDN 中的文档。
¥See documentation in MDN.
实例方法
¥Instance methods
clearMarks()
参见 MDN 中的文档。
¥See documentation in MDN.
clearMeasures()
参见 MDN 中的文档。
¥See documentation in MDN.
getEntries()
参见 MDN 中的文档。
¥See documentation in MDN.
getEntriesByName()
参见 MDN 中的文档。
¥See documentation in MDN.
getEntriesByType()
参见 MDN 中的文档。
¥See documentation in MDN.
mark()
参见 MDN 中的文档。
¥See documentation in MDN.
measure()
参见 MDN 中的文档。
¥See documentation in MDN.
now()
提供从系统启动开始的毫秒数,而不是从应用启动开始的毫秒数。
¥Provides the number of milliseconds from system boot, instead of the number of milliseconds from app startup.
参见 MDN 中的文档。
¥See documentation in MDN.