performance.timerify(fn[, options])
版本历史
| 版本 | 变更 |
|---|---|
| v24.12.0 | 添加 |
| v16.0.0 | 添加了直方图选项。 |
| v16.0.0 | 重新实现以使用纯 JavaScript 和对异步函数计时的能力。 |
| v8.5.0 | 新增于: v8.5.0 |
-
fn<Function> -
options<Object>-
histogram<RecordableHistogram> 使用perf_hooks.createHistogram()创建的直方图对象,以纳秒为单位记录运行时间。\
histogram<RecordableHistogram> A histogram object created usingperf_hooks.createHistogram()that will record runtime durations in nanoseconds.
-
这是 perf_hooks.timerify() 的别名。
\This is an alias of perf_hooks.timerify().
此属性是 Node.js 的扩展。它在 Web 浏览器中不可用。
\This property is an extension by Node.js. It is not available in Web browsers.