Skip to content

Commit

Permalink
src: emit 'params' instead of 'data' for NodeTracing.dataCollected
Browse files Browse the repository at this point in the history
PR-URL: nodejs#24949
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
kjin authored and Trott committed Dec 14, 2018
1 parent 1c52dcc commit 49f1db4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/inspector/tracing_agent.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class InspectorTraceWriter : public node::tracing::AsyncTraceWriter {
return;
json_writer_.reset();
std::ostringstream result(
"{\"method\":\"NodeTracing.dataCollected\",\"data\":",
"{\"method\":\"NodeTracing.dataCollected\",\"params\":",
std::ostringstream::ate);
result << stream_.str();
result << "}";
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-inspector-tracing-domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async function test() {
await generateTrace();
JSON.stringify(await post('NodeTracing.stop', { traceConfig }));
session.disconnect();
assert(traceNotification.data.value.length > 0);
assert(traceNotification.params.value.length > 0);
assert(tracingComplete);
clearInterval(interval);
console.log('Success');
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-trace-events-dynamic-enable.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ async function test() {
const events = [];
let tracingComplete = false;
session.on('NodeTracing.dataCollected', (n) => {
assert.ok(n && n.data && n.data.value);
events.push(...n.data.value); // append the events.
assert.ok(n && n.params && n.params.value);
events.push(...n.params.value); // append the events.
});
session.on('NodeTracing.tracingComplete', () => tracingComplete = true);

Expand Down

0 comments on commit 49f1db4

Please sign in to comment.