(profdata: str, raws: list[str], merged: str)
| 124 | |
| 125 | |
| 126 | def merge_counts(profdata: str, raws: list[str], merged: str) -> dict[str, int]: |
| 127 | if not raws: |
| 128 | return {} |
| 129 | subprocess.run([profdata, "merge", "-o", merged] + raws, check=True) |
| 130 | shown = subprocess.run([profdata, "show", "--all-functions", "--counts", merged], |
| 131 | capture_output=True, text=True, check=True).stdout |
| 132 | return parse_counts(shown) |
| 133 | |
| 134 | |
| 135 | FUNC_RE = re.compile(r"^ (\S.*):$") |
no test coverage detected