class that allows to take CPU profiles from a specific JS thread.
More...
#include <nsolid.h>
|
using | cpu_profiler_proxy_sig = void(*)(int, std::string, void *) |
|
|
template<typename Cb , typename... Data> |
static int | TakeProfile (uint64_t thread_id, uint64_t duration, Cb &&cb, Data &&... data) |
| allows taking a CPU profile from a specific JS thread for a period of time. Only 1 concurrent profile per thread can be taken. More...
|
|
static int | StopProfile (uint64_t thread_id) |
| stops an in-progress CPU profiling from a specific thread_id More...
|
|
class that allows to take CPU profiles from a specific JS thread.
◆ StopProfile()
static int node::nsolid::CpuProfiler::StopProfile |
( |
uint64_t |
thread_id | ) |
|
|
static |
stops an in-progress CPU profiling from a specific thread_id
- Parameters
-
- Returns
- NSOLID_E_SUCCESS in case of success or a different NSOLID_E_ error value otherwise.
◆ TakeProfile()
template<typename Cb , typename... Data>
static int node::nsolid::CpuProfiler::TakeProfile |
( |
uint64_t |
thread_id, |
|
|
uint64_t |
duration, |
|
|
Cb && |
cb, |
|
|
Data &&... |
data |
|
) |
| |
|
static |
allows taking a CPU profile from a specific JS thread for a period of time. Only 1 concurrent profile per thread can be taken.
- Parameters
-
thread_id | JS thread to take the profile from. |
duration | duration in milliseconds of the CPU profile after which the profile will be returned in the callback. |
cb | callback function with the following signature: cb(int status, std::string json, ...Data) |
data | variable number of arguments to be propagated to the callback. |
- Returns
- NSOLID_E_SUCCESS in case of success or a different NSOLID_E_ error value otherwise.
The documentation for this class was generated from the following file: