Skip to content

Commit c9aa695

Browse files
committed
trace_events: fix getCategories
1 parent 806ea92 commit c9aa695

File tree

2 files changed

+40
-12
lines changed

2 files changed

+40
-12
lines changed

src/inspector/tracing_agent.cc

Lines changed: 19 additions & 8 deletions
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>* categorie_list = categories->get();
177+
categorie_list->addItem("node");
178+
categorie_list->addItem("node.async_hooks");
179+
categorie_list->addItem("node.bootstrap");
180+
categorie_list->addItem("node.console");
181+
categorie_list->addItem("node.dns.native");
182+
categorie_list->addItem("node.net.native");
183+
categorie_list->addItem("node.environment");
184+
categorie_list->addItem("node.fs.sync");
185+
categorie_list->addItem("node.fs_dir.sync");
186+
categorie_list->addItem("node.fs.async");
187+
categorie_list->addItem("node.fs_dir.async");
188+
categorie_list->addItem("node.perf");
189+
categorie_list->addItem("node.perf.usertiming");
190+
categorie_list->addItem("node.perf.timerify");
191+
categorie_list->addItem("node.promises.rejections");
192+
categorie_list->addItem("node.vm.script");
193+
categorie_list->addItem("v8");
194+
categorie_list->addItem("node.http");
184195
return DispatchResponse::OK();
185196
}
186197

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

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,27 @@ 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([
52+
"node",
53+
"node.async_hooks",
54+
"node.bootstrap",
55+
"node.console",
56+
"node.dns.native",
57+
"node.net.native",
58+
"node.environment",
59+
"node.fs.sync",
60+
"node.fs_dir.sync",
61+
"node.fs.async",
62+
"node.fs_dir.async",
63+
"node.perf",
64+
"node.perf.usertiming",
65+
"node.perf.timerify",
66+
"node.promises.rejections",
67+
"node.vm.script",
68+
"v8",
69+
"node.http"
70+
],
71+
categories);
5572

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

0 commit comments

Comments
 (0)