From 91adbe14b4490483785e1cd094c1130278cd25f3 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 3 Feb 2019 15:10:19 +0100 Subject: report: include information about event loop itself PR-URL: https://github.com/nodejs/node/pull/25906 Reviewed-By: Colin Ihrig Reviewed-By: Richard Lau Reviewed-By: James M Snell --- src/node_report.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/node_report.h') 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 -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& info); -- cgit v1.2.3