trace_events.getEnabledCategories()
添加於:v10.0.0
- 返回: <string>
返回所有 currently-enabled 跟蹤事件類別的逗號分隔列表。當前啟用的跟蹤事件類別集由所有 currently-enabled Tracing
對象和使用 --trace-event-categories
標誌啟用的任何類別的聯合確定。
給定下麵的文件test.js
,命令node --trace-event-categories node.perf test.js
將在控製台打印'node.async_hooks,node.perf'
。
const trace_events = require('node:trace_events');
const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });
const t2 = trace_events.createTracing({ categories: ['node.perf'] });
const t3 = trace_events.createTracing({ categories: ['v8'] });
t1.enable();
t2.enable();
console.log(trace_events.getEnabledCategories());
相關用法
- Node.js trace_events.getEnabledCategories()用法及代碼示例
- Node.js trace_events.createTracing(options)用法及代碼示例
- Node.js trace_events.createTracing()用法及代碼示例
- Node.js assert.CallTracker tracker.report()用法及代碼示例
- Node.js assert.CallTracker tracker.calls([fn][, exact])用法及代碼示例
- Node.js assert.CallTracker tracker.verify()用法及代碼示例
- Node.js tracing.disable()用法及代碼示例
- Node.js transform._transform(chunk, encoding, callback)用法及代碼示例
- Node.js trim()用法及代碼示例
- Node.js tlsSocket.authorized用法及代碼示例
- Node.js tls.DEFAULT_MAX_VERSION用法及代碼示例
- Node.js timersPromises.setTimeout([delay[, value[, options]]])用法及代碼示例
- Node.js tlsSocket.disableRenegotiation()用法及代碼示例
- Node.js tlsSocket.address()用法及代碼示例
- Node.js tlsSocket.remoteAddress用法及代碼示例
- Node.js tlsSocket.setMaxSendFragment()用法及代碼示例
- Node.js tlsSocket.getProtocol()用法及代碼示例
- Node.js tlsSocket.exportKeyingMaterial()用法及代碼示例
- Node.js tls.DEFAULT_ECDH_CURVE用法及代碼示例
- Node.js tty.WriteStream.hasColors([count][, env])用法及代碼示例
- Node.js tlsSocket.getPeerFinished()用法及代碼示例
- Node.js tlsSocket.getFinished()用法及代碼示例
- Node.js timersPromises.setImmediate([value[, options]])用法及代碼示例
- Node.js text轉speech用法及代碼示例
- Node.js tlsSocket.authorizationError用法及代碼示例
注:本文由純淨天空篩選整理自nodejs.org大神的英文原創作品 trace_events.getEnabledCategories()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。