Add structured compiler diagnostics
This commit is contained in:
parent
0fe968c475
commit
24bd13f9d9
20 changed files with 1386 additions and 58 deletions
|
|
@ -144,6 +144,12 @@ This deterministic benchmark content exists only in a disposable temporary direc
|
|||
)
|
||||
|
||||
|
||||
def write_synthetic_project(root: Path, node_count: int) -> None:
|
||||
"""Create the shared disposable generic benchmark fixture."""
|
||||
|
||||
_write_project(root, node_count)
|
||||
|
||||
|
||||
def _json_size(value: object) -> int | None:
|
||||
if value is None:
|
||||
return None
|
||||
|
|
@ -183,6 +189,29 @@ def _measure(
|
|||
return result, last
|
||||
|
||||
|
||||
def measure_operation(
|
||||
operation: Callable[[], object],
|
||||
*,
|
||||
samples: int,
|
||||
warmups: int = 1,
|
||||
response_size: bool = True,
|
||||
) -> tuple[dict[str, object], object]:
|
||||
"""Measure one operation using the shared baseline method."""
|
||||
|
||||
return _measure(
|
||||
operation,
|
||||
samples=samples,
|
||||
warmups=warmups,
|
||||
response_size=response_size,
|
||||
)
|
||||
|
||||
|
||||
def synthetic_node_id(index: int) -> str:
|
||||
"""Return one deterministic node identifier from the shared fixture."""
|
||||
|
||||
return _node_id(index)
|
||||
|
||||
|
||||
def _run(command: list[str]) -> str:
|
||||
return subprocess.run(
|
||||
command,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue