mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Some general modernizations of templates Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/65148 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
44 lines
1.0 KiB
C++
44 lines
1.0 KiB
C++
#ifndef SRC_NODE_REPORT_H_
|
|
#define SRC_NODE_REPORT_H_
|
|
|
|
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
|
|
#include "node.h"
|
|
#include "node_buffer.h"
|
|
#include "uv.h"
|
|
#include "util.h"
|
|
|
|
#ifndef _WIN32
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
#include <iomanip>
|
|
#include <sstream>
|
|
|
|
namespace node {
|
|
namespace report {
|
|
// Function declarations - utility functions in src/node_report_utils.cc
|
|
void WalkHandleNetwork(uv_handle_t* h, void* arg);
|
|
void WalkHandleNoNetwork(uv_handle_t* h, void* arg);
|
|
|
|
template <std::integral T>
|
|
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 WriteReport(const v8::FunctionCallbackInfo<v8::Value>& info);
|
|
void GetReport(const v8::FunctionCallbackInfo<v8::Value>& info);
|
|
|
|
} // namespace report
|
|
} // namespace node
|
|
|
|
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
|
|
|
|
#endif // SRC_NODE_REPORT_H_
|