Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit bb77e6e

Browse files
addaleaxtargos
authored andcommittedJan 14, 2020
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 284f033 commit bb77e6e

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
@@ -794,6 +794,7 @@ class Http2Session : public AsyncWrap,
794794
tracker->TrackFieldWithSize("outgoing_storage", outgoing_storage_.size());
795795
tracker->TrackFieldWithSize("pending_rst_streams",
796796
pending_rst_streams_.size() * sizeof(int32_t));
797+
tracker->TrackFieldWithSize("nghttp2_memory", current_nghttp2_memory_);
797798
}
798799

799800
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)
Please sign in to comment.