Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2019-06-07 19:44:19 +0300
committercjihrig <cjihrig@gmail.com>2019-06-20 23:16:11 +0300
commitbfe4c9c2c014c909dd77d3981dfab8710336d9c0 (patch)
tree78c4385531e7b7acdb64ba9e8bcd66d4e6e45fb7 /src/node_report.cc
parent7b802685c4980addb51de8f6854de71dce8493f3 (diff)
report: add report versioning
This commit adds a version to the diagnostic report feature. PR-URL: https://github.com/nodejs/node/pull/28121 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/node_report.cc')
-rw-r--r--src/node_report.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_report.cc b/src/node_report.cc
index b448ffd099b..84caf13c5b6 100644
--- a/src/node_report.cc
+++ b/src/node_report.cc
@@ -24,6 +24,7 @@
extern char** environ;
#endif
+constexpr int NODE_REPORT_VERSION = 1;
constexpr int NANOS_PER_SEC = 1000 * 1000 * 1000;
constexpr double SEC_PER_MICROS = 1e-6;
@@ -172,7 +173,7 @@ static void WriteNodeReport(Isolate* isolate,
JSONWriter writer(out);
writer.json_start();
writer.json_objectstart("header");
-
+ writer.json_keyvalue("reportVersion", NODE_REPORT_VERSION);
writer.json_keyvalue("event", message);
writer.json_keyvalue("trigger", trigger);
if (!filename.empty())