From b43c012417f511cd17112088ed20b9576fa7e8d5 Mon Sep 17 00:00:00 2001 From: discord9 <55937128+discord9@users.noreply.github.com> Date: Thu, 10 Sep 2026 20:51:56 +0800 Subject: [PATCH] test(perf): cover smoothing copy removal across window layouts Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> --- .../promql_smoothing_copy/case.toml | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 tests/perf/query_cases/promql_smoothing_copy/case.toml diff --git a/tests/perf/query_cases/promql_smoothing_copy/case.toml b/tests/perf/query_cases/promql_smoothing_copy/case.toml new file mode 100644 index 0000000000..187794dd1c --- /dev/null +++ b/tests/perf/query_cases/promql_smoothing_copy/case.toml @@ -0,0 +1,115 @@ +# 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