Files
greptimedb/tests/perf/query_cases/promql_smoothing_copy/case.toml
T
discord9 555485c40e perf(promql): avoid per-window allocations in simple range functions (#9104)
* perf(promql): avoid per-window allocations in simple range functions

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>

* perf(promql): avoid copying smoothing window values

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>

* test(perf): cover smoothing copy removal across window layouts

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>

* fix(promql): skip null samples in simple range functions

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>

---------

Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
2026-09-11 11:59:45 +00:00

116 lines
3.7 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Bounded nightly PromQL double-exponential-smoothing regression coverage.
#
# 128 series × 780 samples at 15-second cadence = 99,840 rows. Remote write
# ingests four 195-sample chunks and flushes each chunk before querying.
[case]
name = "promql_smoothing_copy"
description = "Bounded nightly PromQL double-exponential-smoothing copy-removal regression"
[scenario]
kind = "prom_remote_write_then_query"
[scenario.remote_write]
database = "public"
metric = "promql_smoothing_copy"
physical_table = "greptime_physical_table"
series_count = 128
samples_per_series = 780
sample_chunk_size = 195
flush_every_sample_chunks = 1
start_unix_millis = 1_704_067_200_000
step_millis = 15_000
chunk_series_count = 128
timeout_seconds = 180
visibility_timeout_seconds = 120
[scenario.remote_write.value]
pattern = "linear"
base = 0
step = 1
[scenario.remote_write.prom_store]
pending_rows_flush_interval = "1s"
max_batch_rows = 100000
# Selector-only scan control for unrelated PromQL/metric-engine variance.
[[scenario.queries]]
name = "selector_2h_15s_control"
kind = "tql"
query = "TQL ANALYZE VERBOSE (1704070800, 1704078000, '15s') promql_smoothing_copy{host=~'host.*'}"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10
[[scenario.queries]]
name = "double_exponential_smoothing_1m_15s"
kind = "tql"
query = "TQL ANALYZE VERBOSE (1704070800, 1704078000, '15s') double_exponential_smoothing(promql_smoothing_copy{host=~'host.*'}[1m], 0.5, 0.1)"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10
[[scenario.queries]]
name = "double_exponential_smoothing_5m_15s"
kind = "tql"
query = "TQL ANALYZE VERBOSE (1704070800, 1704078000, '15s') double_exponential_smoothing(promql_smoothing_copy{host=~'host.*'}[5m], 0.5, 0.1)"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10
# Primary copy-removal stress case: 481 highly-overlapping 240-sample windows.
[[scenario.queries]]
name = "double_exponential_smoothing_1h_15s"
kind = "tql"
query = "TQL ANALYZE VERBOSE (1704070800, 1704078000, '15s') double_exponential_smoothing(promql_smoothing_copy{host=~'host.*'}[1h], 0.5, 0.1)"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10
[[scenario.queries]]
name = "double_exponential_smoothing_1h_5m_overlap"
kind = "tql"
query = "TQL ANALYZE VERBOSE (1704070800, 1704078000, '5m') double_exponential_smoothing(promql_smoothing_copy{host=~'host.*'}[1h], 0.5, 0.1)"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10
# Three disjoint 240-sample windows provide a non-overlapping control.
[[scenario.queries]]
name = "double_exponential_smoothing_1h_1h_nonoverlap"
kind = "tql"
query = "TQL ANALYZE VERBOSE (1704070800, 1704078000, '1h') double_exponential_smoothing(promql_smoothing_copy{host=~'host.*'}[1h], 0.5, 0.1)"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10
# Inspect retained responses manually; the runner does not assert numeric values.
# The three left-open hourly windows contain host0000 values 1..240, 241..480,
# and 481..720. Initial trend is 1 and remains unchanged on the first iteration;
# subsequent trend updates preserve it. With sf=0.5 and tf=0.1, the expected
# outputs are 240, 480, and 720.
[[scenario.queries]]
name = "double_exponential_smoothing_1h_host0000_numeric_control"
kind = "prom_http"
query = "double_exponential_smoothing(promql_smoothing_copy{host=\"host0000\"}[1h], 0.5, 0.1)"
start = "1704070800"
end = "1704078000"
step = "1h"
warmup = 3
iterations = 9
[scenario.queries.thresholds]
max_candidate_latency_regression_pct = 10