阿西河

所有教程

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

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js trace_events tracing.disable

      Node.js trace_events tracing.disable

      新增于: v10.0.0

      Disables this Tracing object.

      Only trace event categories not covered by other enabled Tracing objects and not specified by the –trace-event-categories flag will be disabled.

      const trace_events = require('trace_events');
      const t1 = trace_events.createTracing({ categories: ['node', 'v8'] });
      const t2 = trace_events.createTracing({ categories: ['node.perf', 'node'] });
      t1.enable();
      t2.enable();
      
      // Prints 'node,node.perf,v8'
      console.log(trace_events.getEnabledCategories());
      
      t2.disable(); // will only disable emission of the 'node.perf' category
      
      // Prints 'node,v8'
      console.log(trace_events.getEnabledCategories());
      

      更多内容请参考:Node.js trace_events 跟踪事件,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录