@@ -13,7 +13,7 @@ import {
13
13
} from '../helpers/index.js' ;
14
14
15
15
type HeapSizeOfDisjunctNodes = { currentShallowHeapSize : number ; nextShallowHeapSize : number } ;
16
- type HeapSizeOfNextBestMatch = { sizeByAccuracy : Record < string , { currentShallowHeapSize : number ; nextShallowHeapSize : number } > } ;
16
+ type HeapSizeOfNextBestMatch = { sizeByAccuracy : Record < string , { currentShallowHeapSize : number ; nextShallowHeapSize : number } > ; amountByAccuracy : Record < string , number > } ;
17
17
type HeapSizeOfPerfectMatch = { currentShallowHeapSize : number ; nextShallowHeapSize : number } ;
18
18
type TotalHeapSizeDifference = { currentShallowHeapSize : number ; nextShallowHeapSize : number ; difference : number ; percentage : number } ;
19
19
type TotalNumberOfNodes = { perfectMatchesCurrentNodes : number ; perfectMatchesNextNodes : number ; nextBestMatchesCurrentNodes : number ; nextBestMatchesNextNodes : number ; disjunctCurrentNodes : number ; disjunctNextNodes : number } ;
@@ -167,9 +167,11 @@ export class StatisticsPresenter<T extends BaseComparisonNodesInput> implements
167
167
168
168
for ( const [ accuracy , value ] of Object . entries ( this . comparisonResults . nextBestMatchNodes ) ) {
169
169
sizeByAccuracy [ accuracy ] = { currentShallowHeapSize : 0 , nextShallowHeapSize : 0 } ;
170
- amountByAccuracy [ accuracy ] = value . size ;
170
+ amountByAccuracy [ accuracy ] ??= 0 ;
171
171
172
172
for ( const comparisonResult of value . values ( ) ) {
173
+ amountByAccuracy [ accuracy ] += comparisonResult . currentNodeId . size ;
174
+
173
175
for ( const nodeId of comparisonResult . currentNodeId ) {
174
176
const relatedNode = this . currentValues . get ( nodeId ) ;
175
177
@@ -188,7 +190,7 @@ export class StatisticsPresenter<T extends BaseComparisonNodesInput> implements
188
190
}
189
191
}
190
192
191
- return { sizeByAccuracy} ;
193
+ return { sizeByAccuracy, amountByAccuracy } ;
192
194
}
193
195
194
196
/**
0 commit comments