Skip to content

Commit e355933

Browse files
sort by retainer
1 parent 57e713c commit e355933

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/McpResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ Call ${handleDialog.name} to handle it before continuing.`);
948948
if (nodes) {
949949
const sortedItems = nodes.items
950950
.filter(isNodeLike)
951-
.sort((a, b) => b.selfSize - a.selfSize);
951+
.sort((a, b) => b.retainedSize - a.retainedSize);
952952

953953
const paginationData = this.#dataWithPagination(
954954
sortedItems,

tests/tools/memory.test.js.snapshot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ exports[`memory > get_nodes_by_class > with default options 1`] = `
165165
## Heap Snapshot Data
166166
id,name,type,distance,selfSize,retainedSize
167167
25307,"Array",object,2,192,2056
168+
46355,"Array",object,2,192,2056
168169
33187,"Array",object,2,192,1664
169170
36255,"Array",object,2,192,1664
170-
46355,"Array",object,2,192,2056
171171
45901,"Array",object,5,88,88
172172
46151,"Array",object,5,88,88
173173
45899,"Array",object,5,56,56

0 commit comments

Comments
 (0)