Skip to content

Commit 067df8a

Browse files
committed
Count the compile's two dialect reads in the phase-timing test adapter, as main does
1 parent 055a63a commit 067df8a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • tests/unit/src/sqlbuild/compiler/pipeline/main

‎tests/unit/src/sqlbuild/compiler/pipeline/main/helpers.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class SlowConnectionDuckDbAdapter(DuckDbAdapter):
109109
"""An in-memory DuckDB adapter whose connections, compile profile and rules dialect take
110110
`connection_seconds`, `compile_seconds` and `rules_seconds` on a manual clock.
111111
112-
The compile profile takes its time on its first call; the dialect on its second, which the
113-
rules gate makes after the compile's own dialect read."""
112+
The compile profile takes its time on its first call; the dialect on its third, which the
113+
rules gate makes after the compile's two dialect reads (its adapter context and its profile)."""
114114

115115
def __init__(
116116
self,
@@ -124,7 +124,7 @@ def __init__(
124124
self._clock: ManualClock = clock
125125
self._connection_seconds: float = connection_seconds
126126
self._compile_seconds: float = compile_seconds
127-
self._dialect_seconds: list[float] = [0.0, rules_seconds]
127+
self._dialect_seconds: list[float] = [0.0, 0.0, rules_seconds]
128128

129129
def expression_inference_profile(self) -> ExpressionInferenceProfile:
130130
self._clock.advance(self._compile_seconds)

0 commit comments

Comments
 (0)