Skip to content

Commit

Permalink
http2: track nghttp2-allocated memory in heap snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax authored and BethGriggs committed Feb 6, 2020
1 parent 9be789e commit b2a2c6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/node_http2.h
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ class Http2Session : public AsyncWrap,
tracker->TrackFieldWithSize("outgoing_storage", outgoing_storage_.size());
tracker->TrackFieldWithSize("pending_rst_streams",
pending_rst_streams_.size() * sizeof(int32_t));
tracker->TrackFieldWithSize("nghttp2_memory", current_nghttp2_memory_);
}

SET_MEMORY_INFO_NAME(Http2Session)
Expand Down
1 change: 1 addition & 0 deletions test/pummel/test-heapdump-http2.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ server.listen(0, () => {
{
children: [
{ node_name: 'Http2Session', edge_name: 'wrapped' },
{ node_name: 'Node / nghttp2_memory', edge_name: 'nghttp2_memory' },
{
node_name: 'Node / streams', edge_name: 'streams'
}
Expand Down

0 comments on commit b2a2c6c

Please sign in to comment.