Skip to content

Commit 14c3853

Browse files
committed
use pss memory info type if available
1 parent 322e65c commit 14c3853

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ipykernel/kernelbase.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,9 +982,10 @@ async def usage_request(self, stream, ident, parent):
982982
for process in self.processes.values()
983983
]
984984
)
985+
mem_info_type = "pss" if hasattr(current_process.memory_full_info(), "pss") else "rss"
985986
reply_content["kernel_memory"] = sum(
986987
[
987-
self.get_process_metric_value(process, "memory_info", "rss")
988+
self.get_process_metric_value(process, "memory_full_info", mem_info_type)
988989
for process in self.processes.values()
989990
]
990991
)

0 commit comments

Comments
 (0)