Skip to content

Commit d17ea8f

Browse files
addaleaxtargos
authored andcommitted
http2: track nghttp2-allocated memory in heap snapshot
PR-URL: #30745 Refs: https://github.com/nodejs/quic/blob/34ee0bc96f804c73cb22b2945a1a78f780938492/src/node_mem.h Refs: nodejs/quic#126 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 8a9f57d commit d17ea8f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/node_http2.h

+1
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,7 @@ class Http2Session : public AsyncWrap,
792792
tracker->TrackFieldWithSize("outgoing_storage", outgoing_storage_.size());
793793
tracker->TrackFieldWithSize("pending_rst_streams",
794794
pending_rst_streams_.size() * sizeof(int32_t));
795+
tracker->TrackFieldWithSize("nghttp2_memory", current_nghttp2_memory_);
795796
}
796797

797798
SET_MEMORY_INFO_NAME(Http2Session)

test/pummel/test-heapdump-http2.js

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ server.listen(0, () => {
6969
{
7070
children: [
7171
{ node_name: 'Http2Session', edge_name: 'wrapped' },
72+
{ node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' },
7273
{
7374
node_name: 'Node / streams', edge_name: 'streams'
7475
}

0 commit comments

Comments
 (0)