mirror of https://github.com/lukechilds/node.git
Scott Blomquist
12 years ago
committed by
isaacs
8 changed files with 209 additions and 12 deletions
Binary file not shown.
@ -0,0 +1,59 @@ |
|||||
|
//**********************************************************************`
|
||||
|
//* This is an include file generated by Message Compiler. *`
|
||||
|
//* *`
|
||||
|
//* Copyright (c) Microsoft Corporation. All Rights Reserved. *`
|
||||
|
//**********************************************************************`
|
||||
|
#pragma once |
||||
|
//+
|
||||
|
// Provider NodeJS-ETW-provider Event Count 12
|
||||
|
//+
|
||||
|
EXTERN_C __declspec(selectany) const GUID NODE_ETW_PROVIDER = {0x77754e9b, 0x264b, 0x4d8d, {0xb9, 0x81, 0xe4, 0x13, 0x5c, 0x1e, 0xcb, 0x0c}}; |
||||
|
|
||||
|
//
|
||||
|
// Opcodes
|
||||
|
//
|
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_SERVER_REQUEST 0xa |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_SERVER_RESPONSE 0xb |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_CLIENT_REQUEST 0xc |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_HTTP_CLIENT_RESPONSE 0xd |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_NET_SERVER_CONNECTION 0xe |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_NET_STREAM_END 0xf |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_GC_START 0x10 |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_GC_DONE 0x11 |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_V8SYMBOL_REMOVE 0x15 |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_V8SYMBOL_MOVE 0x16 |
||||
|
#define NODE_ETW_PROVIDER_OPCODE_NODE_V8SYMBOL_RESET 0x17 |
||||
|
#define JSCRIPT_METHOD_METHODLOAD_OPCODE 0xa |
||||
|
|
||||
|
//
|
||||
|
// Tasks
|
||||
|
//
|
||||
|
#define JSCRIPT_METHOD_RUNTIME_TASK 0x1 |
||||
|
|
||||
|
//
|
||||
|
// Event Descriptors
|
||||
|
//
|
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_SERVER_REQUEST_EVENT = {0x1, 0x0, 0x0, 0x4, 0xa, 0x0, 0x0}; |
||||
|
#define NODE_HTTP_SERVER_REQUEST_EVENT_value 0x1 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_SERVER_RESPONSE_EVENT = {0x2, 0x0, 0x0, 0x4, 0xb, 0x0, 0x0}; |
||||
|
#define NODE_HTTP_SERVER_RESPONSE_EVENT_value 0x2 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_CLIENT_REQUEST_EVENT = {0x3, 0x0, 0x0, 0x4, 0xc, 0x0, 0x0}; |
||||
|
#define NODE_HTTP_CLIENT_REQUEST_EVENT_value 0x3 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_HTTP_CLIENT_RESPONSE_EVENT = {0x4, 0x0, 0x0, 0x4, 0xd, 0x0, 0x0}; |
||||
|
#define NODE_HTTP_CLIENT_RESPONSE_EVENT_value 0x4 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_NET_SERVER_CONNECTION_EVENT = {0x5, 0x0, 0x0, 0x4, 0xe, 0x0, 0x0}; |
||||
|
#define NODE_NET_SERVER_CONNECTION_EVENT_value 0x5 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_NET_STREAM_END_EVENT = {0x6, 0x0, 0x0, 0x4, 0xf, 0x0, 0x0}; |
||||
|
#define NODE_NET_STREAM_END_EVENT_value 0x6 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_GC_START_EVENT = {0x7, 0x0, 0x0, 0x4, 0x10, 0x0, 0x0}; |
||||
|
#define NODE_GC_START_EVENT_value 0x7 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_GC_DONE_EVENT = {0x8, 0x0, 0x0, 0x4, 0x11, 0x0, 0x0}; |
||||
|
#define NODE_GC_DONE_EVENT_value 0x8 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR MethodLoad = {0x9, 0x0, 0x0, 0x4, 0xa, 0x1, 0x0}; |
||||
|
#define MethodLoad_value 0x9 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_V8SYMBOL_REMOVE_EVENT = {0x15, 0x0, 0x0, 0x4, 0x15, 0x0, 0x0}; |
||||
|
#define NODE_V8SYMBOL_REMOVE_EVENT_value 0x15 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_V8SYMBOL_MOVE_EVENT = {0x16, 0x0, 0x0, 0x4, 0x16, 0x0, 0x0}; |
||||
|
#define NODE_V8SYMBOL_MOVE_EVENT_value 0x16 |
||||
|
EXTERN_C __declspec(selectany) const EVENT_DESCRIPTOR NODE_V8SYMBOL_RESET_EVENT = {0x17, 0x0, 0x0, 0x4, 0x17, 0x0, 0x0}; |
||||
|
#define NODE_V8SYMBOL_RESET_EVENT_value 0x17 |
@ -0,0 +1,3 @@ |
|||||
|
LANGUAGE 0x9,0x1 |
||||
|
1 11 "MSG00001.bin" |
||||
|
1 WEVT_TEMPLATE "node_etw_providerTEMP.BIN" |
Binary file not shown.
@ -0,0 +1,79 @@ |
|||||
|
/* This file was auto-generated from src\res\node_perfctr_provider.man by ctrpp.exe */ |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
|
||||
|
EXTERN_C DECLSPEC_SELECTANY GUID NodeCounterProviderGuid = { 0x1e2e15d7, 0x3760, 0x470e, 0x86, 0x99, 0xb9, 0xdb, 0x52, 0x48, 0xed, 0xd5 }; |
||||
|
|
||||
|
EXTERN_C DECLSPEC_SELECTANY GUID NodeCounterSetGuid = { 0x3a22a8ec, 0x297c, 0x48ac, 0xab, 0x15, 0x33, 0xec, 0x93, 0x3, 0x3f, 0xd8 }; |
||||
|
|
||||
|
|
||||
|
EXTERN_C DECLSPEC_SELECTANY HANDLE NodeCounterProvider = NULL; |
||||
|
|
||||
|
EXTERN_C DECLSPEC_SELECTANY struct { |
||||
|
PERF_COUNTERSET_INFO CounterSet; |
||||
|
PERF_COUNTER_INFO Counter0; |
||||
|
PERF_COUNTER_INFO Counter1; |
||||
|
PERF_COUNTER_INFO Counter2; |
||||
|
PERF_COUNTER_INFO Counter3; |
||||
|
PERF_COUNTER_INFO Counter4; |
||||
|
PERF_COUNTER_INFO Counter5; |
||||
|
PERF_COUNTER_INFO Counter6; |
||||
|
PERF_COUNTER_INFO Counter7; |
||||
|
PERF_COUNTER_INFO Counter8; |
||||
|
PERF_COUNTER_INFO Counter9; |
||||
|
} NodeCounterSetInfo = { |
||||
|
{ { 0x3a22a8ec, 0x297c, 0x48ac, 0xab, 0x15, 0x33, 0xec, 0x93, 0x3, 0x3f, 0xd8 }, { 0x1e2e15d7, 0x3760, 0x470e, 0x86, 0x99, 0xb9, 0xdb, 0x52, 0x48, 0xed, 0xd5 }, 10, PERF_COUNTERSET_MULTI_INSTANCES }, |
||||
|
{ 1, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 }, |
||||
|
{ 2, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 }, |
||||
|
{ 3, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 }, |
||||
|
{ 4, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 }, |
||||
|
{ 5, PERF_COUNTER_RAWCOUNT, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 }, |
||||
|
{ 6, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 }, |
||||
|
{ 7, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 }, |
||||
|
{ 8, PERF_COUNTER_RAWCOUNT, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 }, |
||||
|
{ 9, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 }, |
||||
|
{ 10, PERF_COUNTER_BULK_COUNT, 0, sizeof(ULONGLONG), PERF_DETAIL_NOVICE, 4294967293, 0 }, |
||||
|
}; |
||||
|
|
||||
|
EXTERN_C FORCEINLINE |
||||
|
VOID |
||||
|
CounterCleanup( |
||||
|
VOID |
||||
|
) |
||||
|
{ |
||||
|
if (NodeCounterProvider != NULL) { |
||||
|
PerfStopProvider(NodeCounterProvider); |
||||
|
NodeCounterProvider = NULL; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
EXTERN_C FORCEINLINE |
||||
|
ULONG |
||||
|
CounterInitialize( |
||||
|
VOID |
||||
|
) |
||||
|
{ |
||||
|
ULONG Status; |
||||
|
PERF_PROVIDER_CONTEXT ProviderContext; |
||||
|
|
||||
|
ZeroMemory(&ProviderContext, sizeof(PERF_PROVIDER_CONTEXT)); |
||||
|
ProviderContext.ContextSize = sizeof(PERF_PROVIDER_CONTEXT); |
||||
|
|
||||
|
Status = PerfStartProviderEx(&NodeCounterProviderGuid, |
||||
|
&ProviderContext, |
||||
|
&NodeCounterProvider); |
||||
|
if (Status != ERROR_SUCCESS) { |
||||
|
NodeCounterProvider = NULL; |
||||
|
return Status; |
||||
|
} |
||||
|
|
||||
|
Status = PerfSetCounterSetInfo(NodeCounterProvider, |
||||
|
&NodeCounterSetInfo.CounterSet, |
||||
|
sizeof NodeCounterSetInfo); |
||||
|
if (Status != ERROR_SUCCESS) { |
||||
|
CounterCleanup(); |
||||
|
return Status; |
||||
|
} |
||||
|
return ERROR_SUCCESS; |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
STRINGTABLE |
||||
|
BEGIN |
||||
|
1 "Node.js" |
||||
|
2 "Node.js" // {Locked} means don't localize |
||||
|
3 "Node.js performance counters" |
||||
|
5 "HTTP server requests" |
||||
|
6 "HTTP server requests" // {Locked} means don't localize |
||||
|
7 "Number of HTTP server requests" |
||||
|
9 "HTTP server responses" |
||||
|
10 "HTTP server responses" // {Locked} means don't localize |
||||
|
11 "Number of HTTP server responses" |
||||
|
13 "HTTP client requests" |
||||
|
14 "HTTP client requests" // {Locked} means don't localize |
||||
|
15 "Number of HTTP client requests" |
||||
|
17 "HTTP client responses" |
||||
|
18 "HTTP client responses" // {Locked} means don't localize |
||||
|
19 "Number of HTTP client responses" |
||||
|
21 "Active server connections" |
||||
|
22 "Active server connections" // {Locked} means don't localize |
||||
|
23 "Number of server connections" |
||||
|
25 "Network bytes sent" |
||||
|
26 "Network bytes sent" // {Locked} means don't localize |
||||
|
27 "Number of bytes sent using TCP" |
||||
|
29 "Network bytes received" |
||||
|
30 "Network bytes received" // {Locked} means don't localize |
||||
|
31 "Number of bytes received using TCP" |
||||
|
33 "%Time in GC" |
||||
|
34 "%Time in GC" // {Locked} means don't localize |
||||
|
35 "Percent of time for last GC" |
||||
|
37 "Pipe bytes sent" |
||||
|
38 "Pipe bytes sent" // {Locked} means don't localize |
||||
|
39 "Number of bytes sent using pipe" |
||||
|
41 "Pipe bytes received" |
||||
|
42 "Pipe bytes received" // {Locked} means don't localize |
||||
|
43 "Number of bytes received using pipe" |
||||
|
END |
Loading…
Reference in new issue