inspector: add a "NodeTracing" domain support · nodejs/node@04f7678 · GitHub
Skip to content

Commit 04f7678

Browse files
Eugene OstroukhovMylesBorins
authored andcommitted
inspector: add a "NodeTracing" domain support
This change adds a new inspector domain for receiving Node tracing data. 1. Node.js now can extend Inspector protocol with new domains with the API defined in the src/inspector/node_protocol.pdl. 2. Plumbing code will be generated at the build time. /json/protocol HTTP endpoint returns both V8 and Node.js inspector protocol. 3. "NodeTracing" domain was introduced. It is based on the Chrome "Tracing" domain. PR-URL: #20608 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
1 parent cb94601 commit 04f7678

19 files changed

Lines changed: 843 additions & 160 deletions

node.gyp

Lines changed: 165 additions & 48 deletions

src/inspector/node_protocol.pdl

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Please notify @nodejs/v8-inspector and @nodejs/trace-events before modifying this file
2+
version
3+
major 1
4+
minor 0
5+
6+
experimental domain NodeTracing
7+
type TraceConfig extends object
8+
properties
9+
# Controls how the trace buffer stores data.
10+
optional enum recordMode
11+
recordUntilFull
12+
recordContinuously
13+
recordAsMuchAsPossible
14+
# Included category filters.
15+
array of string includedCategories
16+
17+
# Gets supported tracing categories.
18+
command getCategories
19+
returns
20+
# A list of supported tracing categories.
21+
array of string categories
22+
23+
# Start trace events collection.
24+
command start
25+
parameters
26+
TraceConfig traceConfig
27+
28+
# Stop trace events collection. Remaining collected events will be sent as a sequence of
29+
# dataCollected events followed by tracingComplete event.
30+
command stop
31+
32+
# Contains an bucket of collected trace events.
33+
event dataCollected
34+
parameters
35+
array of object value
36+
37+
# Signals that tracing is stopped and there is no trace buffers pending flush, all data were
38+
# delivered via dataCollected events.
39+
event tracingComplete
Lines changed: 27 additions & 0 deletions

0 commit comments

Comments
 (0)