阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js perf_hooks performance.measure

      Node.js perf_hooks performance.measure(name, startMark, endMark)

      新增于: v8.5.0

      • name < string>
      • startMark < string>
      • endMark < string>

      Creates a new PerformanceMeasure entry in the Performance Timeline. A PerformanceMeasure is a subclass of PerformanceEntry whose performanceEntry.entryType is always ‘measure’, and whose performanceEntry.duration measures the number of milliseconds elapsed since startMark and endMark.

      The startMark argument may identify any existing PerformanceMark in the Performance Timeline, or may identify any of the timestamp properties provided by the PerformanceNodeTiming class. If the named startMark does not exist, then startMark is set to timeOrigin by default.

      The endMark argument must identify any existing PerformanceMark in the Performance Timeline or any of the timestamp properties provided by the PerformanceNodeTiming class. If the named endMark does not exist, an error will be thrown.


      更多内容请参考:Node.js perf_hooks 性能钩子,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录