()
| 555 | } |
| 556 | |
| 557 | toString() { |
| 558 | let ticks = " ▁▂▃▄▅▆▇█"; |
| 559 | let accString = this.accumulator.reduce((str, each) => { |
| 560 | let index = Math.round(each / this.max * (ticks.length - 1)); |
| 561 | return str + ticks[index]; |
| 562 | }, ''); |
| 563 | let percent0 = this.accumulator[0] |
| 564 | let percent1 = this.accumulator[1]; |
| 565 | let percent2plus = this.accumulator.slice(2) |
| 566 | .reduce((sum, each) => sum + each, 0); |
| 567 | return " - fn nesting level: " + |
| 568 | ' avg=' + formatNumber(this.avg) + |
| 569 | ' l0=' + PERCENT(percent0, this.totalBytes) + |
| 570 | ' l1=' + PERCENT(percent1, this.totalBytes) + |
| 571 | ' l2+=' + PERCENT(percent2plus, this.totalBytes) + |
| 572 | ' nesting-histogram=[' + accString + ']'; |
| 573 | |
| 574 | } |
| 575 | |
| 576 | setMetrics(dict) {} |
| 577 | } |
no test coverage detected