(stats: Stats)
| 744 | |
| 745 | def calc_execution_count_table(prefix: str) -> RowCalculator: |
| 746 | def calc(stats: Stats) -> Rows: |
| 747 | opcode_stats = stats.get_opcode_stats(prefix) |
| 748 | counts = opcode_stats.get_execution_counts() |
| 749 | total = opcode_stats.get_total_execution_count() |
| 750 | cumulative = 0 |
| 751 | rows: Rows = [] |
| 752 | for opcode, (count, miss) in sorted( |
| 753 | counts.items(), key=itemgetter(1), reverse=True |
| 754 | ): |
| 755 | cumulative += count |
| 756 | if miss: |
| 757 | miss_val = Ratio(miss, count) |
| 758 | else: |
| 759 | miss_val = None |
| 760 | rows.append( |
| 761 | ( |
| 762 | opcode, |
| 763 | Count(count), |
| 764 | Ratio(count, total), |
| 765 | Ratio(cumulative, total), |
| 766 | miss_val, |
| 767 | ) |
| 768 | ) |
| 769 | return rows |
| 770 | |
| 771 | return calc |
| 772 |
nothing calls this directly
no test coverage detected
searching dependent graphs…