Files
node/tools
James M Snell 5c27e44488 trace_events: adds a new trace_events api
Removes the requirement to use `--trace-events-enabled` to enable
trace events. Tracing is enabled automatically if there are any
enabled categories.

Adds a new `trace_events` module with an API for enabling/disabling
trace events at runtime without a command line flag.

```js
const trace_events = require('trace_events');
const categories = [ 'node.perf', 'node.async_hooks' ];
const tracing = trace_events.createTracing({ categories });
tracing.enable();
// do stuff
tracing.disable();
```

Multiple `Tracing` objects may exist and be enabled at any point
in time. The enabled trace event categories is the union of all
enabled `Tracing` objects and the `--trace-event-categories`
flag.

PR-URL: https://github.com/nodejs/node/pull/19803
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2018-04-17 08:30:20 -07:00
..
2018-04-14 12:25:59 -07:00
2017-11-18 20:44:17 +01:00
2018-03-26 18:20:07 -04:00
2018-03-05 08:35:44 -06:00
2016-06-28 17:48:22 -04:00
2016-06-28 17:48:22 -04:00
2017-10-29 19:46:43 +01:00
2018-01-11 09:50:47 +01:00
2018-04-11 13:23:27 -04:00
2018-04-10 06:45:45 +09:00
2018-04-13 20:51:18 +02:00
2018-01-11 09:50:47 +01:00