Node.js  v8.x
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine
node_win32_perfctr_provider.cc File Reference
#include "node_counters.h"
#include "node_win32_perfctr_provider.h"
#include <perflib.h>
#include "node_perfctr_provider.h"
Include dependency graph for node_win32_perfctr_provider.cc:

Go to the source code of this file.

Namespaces

 node
 

Macros

#define __INIT_node_perfctr_provider_IMP
 
#define NODE_COUNTER_HTTP_SERVER_REQUEST   1
 
#define NODE_COUNTER_HTTP_SERVER_RESPONSE   2
 
#define NODE_COUNTER_HTTP_CLIENT_REQUEST   3
 
#define NODE_COUNTER_HTTP_CLIENT_RESPONSE   4
 
#define NODE_COUNTER_SERVER_CONNS   5
 
#define NODE_COUNTER_NET_BYTES_SENT   6
 
#define NODE_COUNTER_NET_BYTES_RECV   7
 
#define NODE_COUNTER_GC_PERCENTTIME   8
 
#define NODE_COUNTER_PIPE_BYTES_SENT   9
 
#define NODE_COUNTER_PIPE_BYTES_RECV   10
 
#define INST_MAX_LEN   32
 
#define INST_PREFIX_LEN   5
 
#define INST_PREFIX   L"node_"
 

Typedefs

typedef ULONG(WINAPI * PerfStartProviderExFunc) (__in LPGUID ProviderGuid, __in_opt PPERF_PROVIDER_CONTEXT ProviderContext, __out PHANDLE Provider)
 
typedef ULONG(WINAPI * PerfStopProviderFunc) (__in HANDLE ProviderHandle)
 
typedef ULONG(WINAPI * PerfSetCounterSetInfoFunc) (__in HANDLE ProviderHandle, __inout_bcount(TemplateSize) PPERF_COUNTERSET_INFO Template, __in ULONG TemplateSize)
 
typedef PPERF_COUNTERSET_INSTANCE(WINAPI * PerfCreateInstanceFunc) (__in HANDLE ProviderHandle, __in LPCGUID CounterSetGuid, __in PCWSTR Name, __in ULONG Id)
 
typedef ULONG(WINAPI * PerfDeleteInstanceFunc) (__in HANDLE Provider, __in PPERF_COUNTERSET_INSTANCE InstanceBlock)
 
typedef ULONG(WINAPI * PerfSetULongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONG Value)
 
typedef ULONG(WINAPI * PerfSetULongLongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONGLONG Value)
 
typedef ULONG(WINAPI * PerfIncrementULongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONG Value)
 
typedef ULONG(WINAPI * PerfIncrementULongLongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONGLONG Value)
 
typedef ULONG(WINAPI * PerfDecrementULongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONG Value)
 
typedef ULONG(WINAPI * PerfDecrementULongLongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONGLONG Value)
 

Functions

void InitPerfCountersWin32 ()
 
void TermPerfCountersWin32 ()
 
void NODE_COUNT_HTTP_SERVER_REQUEST ()
 
void NODE_COUNT_HTTP_SERVER_RESPONSE ()
 
void NODE_COUNT_HTTP_CLIENT_REQUEST ()
 
void NODE_COUNT_HTTP_CLIENT_RESPONSE ()
 
void NODE_COUNT_SERVER_CONN_OPEN ()
 
void NODE_COUNT_SERVER_CONN_CLOSE ()
 
void NODE_COUNT_NET_BYTES_SENT (int bytes)
 
void NODE_COUNT_NET_BYTES_RECV (int bytes)
 
uint64_t NODE_COUNT_GET_GC_RAWTIME ()
 
void NODE_COUNT_GC_PERCENTTIME (unsigned int percent)
 
void NODE_COUNT_PIPE_BYTES_SENT (int bytes)
 
void NODE_COUNT_PIPE_BYTES_RECV (int bytes)
 

Variables

HMODULE advapimod
 
PerfStartProviderExFunc perfctr_startProvider
 
PerfStopProviderFunc perfctr_stopProvider
 
PerfSetCounterSetInfoFunc perfctr_setCounterSetInfo
 
PerfCreateInstanceFunc perfctr_createInstance
 
PerfDeleteInstanceFunc perfctr_deleteInstance
 
PerfSetULongCounterValueFunc perfctr_setULongValue
 
PerfSetULongLongCounterValueFunc perfctr_setULongLongValue
 
PerfIncrementULongCounterValueFunc perfctr_incrementULongValue
 
PerfIncrementULongLongCounterValueFunc perfctr_incrementULongLongValue
 
PerfDecrementULongCounterValueFunc perfctr_decrementULongValue
 
PerfDecrementULongLongCounterValueFunc perfctr_decrementULongLongValue
 
PPERF_COUNTERSET_INSTANCE perfctr_instance
 
EXTERN_C DECLSPEC_SELECTANY HANDLE NodeCounterProvider = nullptr
 

Macro Definition Documentation

◆ __INIT_node_perfctr_provider_IMP

#define __INIT_node_perfctr_provider_IMP

Definition at line 22 of file node_win32_perfctr_provider.cc.

◆ INST_MAX_LEN

#define INST_MAX_LEN   32

◆ INST_PREFIX

#define INST_PREFIX   L"node_"

◆ INST_PREFIX_LEN

#define INST_PREFIX_LEN   5

◆ NODE_COUNTER_GC_PERCENTTIME

#define NODE_COUNTER_GC_PERCENTTIME   8

Definition at line 114 of file node_win32_perfctr_provider.cc.

Referenced by node::NODE_COUNT_GC_PERCENTTIME().

◆ NODE_COUNTER_HTTP_CLIENT_REQUEST

#define NODE_COUNTER_HTTP_CLIENT_REQUEST   3

◆ NODE_COUNTER_HTTP_CLIENT_RESPONSE

#define NODE_COUNTER_HTTP_CLIENT_RESPONSE   4

◆ NODE_COUNTER_HTTP_SERVER_REQUEST

#define NODE_COUNTER_HTTP_SERVER_REQUEST   1

◆ NODE_COUNTER_HTTP_SERVER_RESPONSE

#define NODE_COUNTER_HTTP_SERVER_RESPONSE   2

◆ NODE_COUNTER_NET_BYTES_RECV

#define NODE_COUNTER_NET_BYTES_RECV   7

Definition at line 113 of file node_win32_perfctr_provider.cc.

Referenced by node::NODE_COUNT_NET_BYTES_RECV().

◆ NODE_COUNTER_NET_BYTES_SENT

#define NODE_COUNTER_NET_BYTES_SENT   6

Definition at line 112 of file node_win32_perfctr_provider.cc.

Referenced by node::NODE_COUNT_NET_BYTES_SENT().

◆ NODE_COUNTER_PIPE_BYTES_RECV

#define NODE_COUNTER_PIPE_BYTES_RECV   10

Definition at line 116 of file node_win32_perfctr_provider.cc.

Referenced by node::NODE_COUNT_PIPE_BYTES_RECV().

◆ NODE_COUNTER_PIPE_BYTES_SENT

#define NODE_COUNTER_PIPE_BYTES_SENT   9

Definition at line 115 of file node_win32_perfctr_provider.cc.

Referenced by node::NODE_COUNT_PIPE_BYTES_SENT().

◆ NODE_COUNTER_SERVER_CONNS

#define NODE_COUNTER_SERVER_CONNS   5

Typedef Documentation

◆ PerfCreateInstanceFunc

typedef PPERF_COUNTERSET_INSTANCE(WINAPI * PerfCreateInstanceFunc) (__in HANDLE ProviderHandle, __in LPCGUID CounterSetGuid, __in PCWSTR Name, __in ULONG Id)

Definition at line 44 of file node_win32_perfctr_provider.cc.

◆ PerfDecrementULongCounterValueFunc

typedef ULONG(WINAPI * PerfDecrementULongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONG Value)

Definition at line 78 of file node_win32_perfctr_provider.cc.

◆ PerfDecrementULongLongCounterValueFunc

typedef ULONG(WINAPI * PerfDecrementULongLongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONGLONG Value)

Definition at line 84 of file node_win32_perfctr_provider.cc.

◆ PerfDeleteInstanceFunc

typedef ULONG(WINAPI * PerfDeleteInstanceFunc) (__in HANDLE Provider, __in PPERF_COUNTERSET_INSTANCE InstanceBlock)

Definition at line 50 of file node_win32_perfctr_provider.cc.

◆ PerfIncrementULongCounterValueFunc

typedef ULONG(WINAPI * PerfIncrementULongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONG Value)

Definition at line 66 of file node_win32_perfctr_provider.cc.

◆ PerfIncrementULongLongCounterValueFunc

typedef ULONG(WINAPI * PerfIncrementULongLongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONGLONG Value)

Definition at line 72 of file node_win32_perfctr_provider.cc.

◆ PerfSetCounterSetInfoFunc

typedef ULONG(WINAPI * PerfSetCounterSetInfoFunc) (__in HANDLE ProviderHandle, __inout_bcount(TemplateSize) PPERF_COUNTERSET_INFO Template, __in ULONG TemplateSize)

Definition at line 39 of file node_win32_perfctr_provider.cc.

◆ PerfSetULongCounterValueFunc

typedef ULONG(WINAPI * PerfSetULongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONG Value)

Definition at line 54 of file node_win32_perfctr_provider.cc.

◆ PerfSetULongLongCounterValueFunc

typedef ULONG(WINAPI * PerfSetULongLongCounterValueFunc) (__in HANDLE Provider, __inout PPERF_COUNTERSET_INSTANCE Instance, __in ULONG CounterId, __in ULONGLONG Value)

Definition at line 60 of file node_win32_perfctr_provider.cc.

◆ PerfStartProviderExFunc

typedef ULONG(WINAPI * PerfStartProviderExFunc) (__in LPGUID ProviderGuid, __in_opt PPERF_PROVIDER_CONTEXT ProviderContext, __out PHANDLE Provider)

Definition at line 31 of file node_win32_perfctr_provider.cc.

◆ PerfStopProviderFunc

typedef ULONG(WINAPI * PerfStopProviderFunc) (__in HANDLE ProviderHandle)

Definition at line 36 of file node_win32_perfctr_provider.cc.

Variable Documentation

◆ advapimod

HMODULE advapimod

◆ perfctr_createInstance

PerfCreateInstanceFunc perfctr_createInstance

Definition at line 95 of file node_win32_perfctr_provider.cc.

Referenced by node::InitPerfCountersWin32().

◆ perfctr_decrementULongLongValue

PerfDecrementULongLongCounterValueFunc perfctr_decrementULongLongValue

Definition at line 102 of file node_win32_perfctr_provider.cc.

Referenced by node::InitPerfCountersWin32().

◆ perfctr_decrementULongValue

◆ perfctr_deleteInstance

PerfDeleteInstanceFunc perfctr_deleteInstance

Definition at line 96 of file node_win32_perfctr_provider.cc.

Referenced by node::InitPerfCountersWin32().

◆ perfctr_incrementULongLongValue

◆ perfctr_incrementULongValue

◆ perfctr_instance

◆ perfctr_setCounterSetInfo

PerfSetCounterSetInfoFunc perfctr_setCounterSetInfo

Definition at line 94 of file node_win32_perfctr_provider.cc.

Referenced by node::InitPerfCountersWin32().

◆ perfctr_setULongLongValue

PerfSetULongLongCounterValueFunc perfctr_setULongLongValue

Definition at line 98 of file node_win32_perfctr_provider.cc.

Referenced by node::InitPerfCountersWin32().

◆ perfctr_setULongValue

◆ perfctr_startProvider

PerfStartProviderExFunc perfctr_startProvider

Definition at line 92 of file node_win32_perfctr_provider.cc.

Referenced by node::InitPerfCountersWin32().

◆ perfctr_stopProvider

PerfStopProviderFunc perfctr_stopProvider