Skip to content

Commit 20a39a3

Browse files
theanarkhdanielleadams
authored andcommitted
trace_events: fix getCategories
PR-URL: #45092 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 12779b3 commit 20a39a3

File tree

2 files changed

+38
-12
lines changed

2 files changed

+38
-12
lines changed

src/inspector/tracing_agent.cc

+19-8
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,25 @@ DispatchResponse TracingAgent::stop() {
173173
DispatchResponse TracingAgent::getCategories(
174174
std::unique_ptr<protocol::Array<String>>* categories) {
175175
*categories = Array<String>::create();
176-
categories->get()->addItem("node");
177-
categories->get()->addItem("node.async");
178-
categories->get()->addItem("node.bootstrap");
179-
categories->get()->addItem("node.fs.sync");
180-
categories->get()->addItem("node.perf");
181-
categories->get()->addItem("node.perf.usertiming");
182-
categories->get()->addItem("node.perf.timerify");
183-
categories->get()->addItem("v8");
176+
protocol::Array<String>* categories_list = categories->get();
177+
categories_list->addItem("node");
178+
categories_list->addItem("node.async_hooks");
179+
categories_list->addItem("node.bootstrap");
180+
categories_list->addItem("node.console");
181+
categories_list->addItem("node.dns.native");
182+
categories_list->addItem("node.net.native");
183+
categories_list->addItem("node.environment");
184+
categories_list->addItem("node.fs.sync");
185+
categories_list->addItem("node.fs_dir.sync");
186+
categories_list->addItem("node.fs.async");
187+
categories_list->addItem("node.fs_dir.async");
188+
categories_list->addItem("node.perf");
189+
categories_list->addItem("node.perf.usertiming");
190+
categories_list->addItem("node.perf.timerify");
191+
categories_list->addItem("node.promises.rejections");
192+
categories_list->addItem("node.vm.script");
193+
categories_list->addItem("v8");
194+
categories_list->addItem("node.http");
184195
return DispatchResponse::OK();
185196
}
186197

test/parallel/test-inspector-tracing-domain.js

+19-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,25 @@ async function test() {
4848
session.on('NodeTracing.dataCollected', (n) => traceNotification = n);
4949
session.on('NodeTracing.tracingComplete', () => tracingComplete = true);
5050
const { categories } = await post('NodeTracing.getCategories');
51-
compareIgnoringOrder(['node', 'node.async', 'node.bootstrap', 'node.fs.sync',
52-
'node.perf', 'node.perf.usertiming',
53-
'node.perf.timerify', 'v8'],
54-
categories);
51+
compareIgnoringOrder(['node',
52+
'node.async_hooks',
53+
'node.bootstrap',
54+
'node.console',
55+
'node.dns.native',
56+
'node.net.native',
57+
'node.environment',
58+
'node.fs.sync',
59+
'node.fs_dir.sync',
60+
'node.fs.async',
61+
'node.fs_dir.async',
62+
'node.perf',
63+
'node.perf.usertiming',
64+
'node.perf.timerify',
65+
'node.promises.rejections',
66+
'node.vm.script',
67+
'v8',
68+
'node.http',
69+
], categories);
5570

5671
const traceConfig = { includedCategories: ['v8'] };
5772
await post('NodeTracing.start', { traceConfig });

0 commit comments

Comments
 (0)