summaryrefslogtreecommitdiff
path: root/src/node_report.h
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-02-03 15:10:19 +0100
committerAnna Henningsen <anna@addaleax.net>2019-02-06 15:36:24 +0100
commit91adbe14b4490483785e1cd094c1130278cd25f3 (patch)
tree5718fe59de72de50e1b067076803256f7bb5a3fc /src/node_report.h
parentb1f82e4342f8a630b1ef83cd33781a725428f569 (diff)
downloadandroid-node-v8-91adbe14b4490483785e1cd094c1130278cd25f3.tar.gz
android-node-v8-91adbe14b4490483785e1cd094c1130278cd25f3.tar.bz2
android-node-v8-91adbe14b4490483785e1cd094c1130278cd25f3.zip
report: include information about event loop itself
PR-URL: https://github.com/nodejs/node/pull/25906 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_report.h')
-rw-r--r--src/node_report.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/node_report.h b/src/node_report.h
index 9b67dcf1c5..eb38bee8c6 100644
--- a/src/node_report.h
+++ b/src/node_report.h
@@ -57,8 +57,15 @@ void GetNodeReport(v8::Isolate* isolate,
void ReportEndpoints(uv_handle_t* h, std::ostringstream& out);
void WalkHandle(uv_handle_t* h, void* arg);
std::string EscapeJsonChars(const std::string& str);
+
template <typename T>
-std::string ValueToHexString(T value);
+std::string ValueToHexString(T value) {
+ std::stringstream hex;
+
+ hex << "0x" << std::setfill('0') << std::setw(sizeof(T) * 2) << std::hex <<
+ value;
+ return hex.str();
+}
// Function declarations - export functions in src/node_report_module.cc
void TriggerReport(const v8::FunctionCallbackInfo<v8::Value>& info);