mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #23707 from ClickHouse/aku/perf-stable-query-index
stable query indexes in perf test
This commit is contained in:
commit
0c1e897e80
@ -81,7 +81,10 @@ def substitute_parameters(query_templates, other_templates = []):
|
||||
query_results = []
|
||||
other_results = [[]] * (len(other_templates))
|
||||
for i, q in enumerate(query_templates):
|
||||
keys = set(n for _, n, _, _ in string.Formatter().parse(q) if n)
|
||||
# We need stable order of keys here, so that the order of substitutions
|
||||
# is always the same, and the query indexes are consistent across test
|
||||
# runs.
|
||||
keys = sorted(set(n for _, n, _, _ in string.Formatter().parse(q) if n))
|
||||
values = [available_parameters[k] for k in keys]
|
||||
combos = itertools.product(*values)
|
||||
for c in combos:
|
||||
|
Loading…
Reference in New Issue
Block a user