Commit 722df84
committed
test: stabilize flaky streaming-aggregation memory test
The tracemalloc peak of the streaming GROUP BY varies run to run (~1.2x-4x
the source) because DataFusion processes partitions concurrently, so the
number of in-flight partitions (and the peak) scales with the core count.
A single sample right at the 4x threshold flaked intermittently across
Python versions in CI.
Sample the peak a few times and assert on the minimum: the best run
reflects the true streaming floor (~1.5x source), while a regression that
buffers the whole row set would keep every sample high, so the minimum
still catches it. Threshold stays at 4x source size.1 parent d8ffa52 commit 722df84
1 file changed
Lines changed: 18 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
95 | | - | |
| 96 | + | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
99 | 107 | | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
103 | | - | |
104 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
| |||
0 commit comments