(self, prefix: str)
| 594 | } |
| 595 | |
| 596 | def get_histogram(self, prefix: str) -> list[tuple[int, int]]: |
| 597 | rows = [] |
| 598 | for k, v in self._data.items(): |
| 599 | match = re.match(f"{prefix}\\[([0-9]+)\\]", k) |
| 600 | if match is not None: |
| 601 | entry = int(match.groups()[0]) |
| 602 | rows.append((entry, v)) |
| 603 | rows.sort() |
| 604 | return rows |
| 605 | |
| 606 | def get_rare_events(self) -> list[tuple[str, int]]: |
| 607 | prefix = "Rare event " |