| 75 | // Check that a lower bound for histogram memory does not exceed the |
| 76 | // overall counter. |
| 77 | checkHistogram(type, entry, bucket_sizes, histogram, overallProperty) { |
| 78 | let sum = 0; |
| 79 | for (let i = 1; i < entry[histogram].length; i++) { |
| 80 | sum += entry[histogram][i] * bucket_sizes[i - 1]; |
| 81 | } |
| 82 | const overall = entry[overallProperty]; |
| 83 | if (sum >= overall) { |
| 84 | console.error( |
| 85 | `${type}: sum('${histogram}') > overall (${sum} > ${overall})`); |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | sortInstanceTypePeakMemory() { |
| 90 | let entries = Object.entries(this.instanceTypePeakMemory); |