Skip to content

Commit 8e311d2

Browse files
sblompiscisaureus
authored andcommitted
windows: add support for '_Total' perf counters
1 parent 8018113 commit 8e311d2

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

src/res/node_perfctr_provider.man

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,81 +14,91 @@
1414
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet"
1515
name="Node.js"
1616
description="Node.js performance counters"
17-
instances="multiple">
17+
instances="multipleAggregate">
1818

1919
<counter id="1"
2020
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvreq"
2121
name="HTTP server requests"
2222
description="Number of HTTP server requests"
2323
type="perf_counter_counter"
24-
detailLevel="standard" />
24+
detailLevel="standard"
25+
aggregate="sum" />
2526

2627
<counter id="2"
2728
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpsrvrsp"
2829
name="HTTP server responses"
2930
description="Number of HTTP server responses"
3031
type="perf_counter_counter"
31-
detailLevel="standard" />
32+
detailLevel="standard"
33+
aggregate="sum" />
3234

3335
<counter id="3"
3436
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclireq"
3537
name="HTTP client requests"
3638
description="Number of HTTP client requests"
3739
type="perf_counter_counter"
38-
detailLevel="standard" />
40+
detailLevel="standard"
41+
aggregate="sum" />
3942

4043
<counter id="4"
4144
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.httpclirsp"
4245
name="HTTP client responses"
4346
description="Number of HTTP client responses"
4447
type="perf_counter_counter"
45-
detailLevel="standard" />
48+
detailLevel="standard"
49+
aggregate="sum" />
4650

4751
<counter id="5"
4852
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netsrvconn"
4953
name="Active server connections"
5054
description="Number of server connections"
5155
type="perf_counter_rawcount"
52-
detailLevel="standard" />
56+
detailLevel="standard"
57+
aggregate="sum" />
5358

5459
<counter id="6"
5560
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbytesent"
5661
name="Network bytes sent"
5762
description="Number of bytes sent using TCP"
5863
type="perf_counter_bulk_count"
5964
detailLevel="standard"
60-
defaultScale="-3" />
65+
defaultScale="-3"
66+
aggregate="sum" />
6167

6268
<counter id="7"
6369
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.netbyterecv"
6470
name="Network bytes received"
6571
description="Number of bytes received using TCP"
6672
type="perf_counter_bulk_count"
6773
detailLevel="standard"
68-
defaultScale="-3" />
74+
defaultScale="-3"
75+
aggregate="sum" />
6976

7077
<counter id="8"
7178
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.gctime"
7279
name="%Time in GC"
7380
description="Percent of time for last GC"
7481
type="perf_counter_rawcount"
75-
detailLevel="standard" />
82+
detailLevel="standard"
83+
aggregate="avg" />
7684

7785
<counter id="9"
7886
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebytesent"
7987
name="Pipe bytes sent"
8088
description="Number of bytes sent using pipe"
8189
type="perf_counter_bulk_count"
8290
detailLevel="standard"
83-
defaultScale="-3" />
91+
defaultScale="-3"
92+
aggregate="sum" />
8493

8594
<counter id="10"
8695
uri="Microsoft.Windows.System.PerfCounters.NodeCounterSet.pipebyterecv"
8796
name="Pipe bytes received"
8897
description="Number of bytes received using pipe"
8998
type="perf_counter_bulk_count"
9099
detailLevel="standard"
91-
defaultScale="-3" />
100+
defaultScale="-3"
101+
aggregate="sum" />
92102

93103
</counterSet>
94104
</provider>

tools/msvs/genfiles/node_perfctr_provider.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ EXTERN_C DECLSPEC_SELECTANY struct {
2323
PERF_COUNTER_INFO Counter8;
2424
PERF_COUNTER_INFO Counter9;
2525
} NodeCounterSetInfo = {
26-
{ { 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 },
26+
{ { 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_AGGREGATE },
2727
{ 1, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
2828
{ 2, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },
2929
{ 3, PERF_COUNTER_COUNTER, 0, sizeof(ULONG), PERF_DETAIL_NOVICE, 0, 0 },

0 commit comments

Comments
 (0)