mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-09-21 20:55:34 +00:00
* feat(mito2): add opt-in byte stream split encoding Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(mito2): correct float encoding checks Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(compat): cover float SST encoding Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(mito2): compile float encoding tests Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(mito2): release parquet test writer Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(mito2): register float test primary key Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(mito2): verify BSS write lifecycles Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(metric-engine): verify BSS physical SST Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(mito2): verify bulk BSS lifecycle Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(mito2): compile bulk BSS test Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * refactor(mito2): narrow bulk encoding constructors Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(compat): accept generated float upgrade output Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(compat): accept generated float downgrade output Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * refactor(mito2): narrow bulk encoding builder Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(perf): add default versus BSS storage comparison Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(perf): align BSS reader benchmarks with prior study Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(perf): parse current read benchmark averages Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(perf): retain default float encoding in direct SST fixtures Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(perf): isolate BSS user SSTs and benchmark every file Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * docs(perf): record measured BSS storage and reader tradeoffs Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * docs(perf): expose warm scan variability and evidence limits Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * docs(perf): clarify BSS baseline and storage measurement scope Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(perf): model bounded mixed integer and fractional metric series Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * docs(perf): report bounded mixed BSS measurements and query regressions Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * docs(perf): qualify timings affected by concurrent host builds Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * test(perf): include float BSS comparison in default regression cases Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> * fix(perf): omit unsupported float encoding option from baseline setup Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com> --------- Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
84 lines
3.3 KiB
Python
84 lines
3.3 KiB
Python
#!/usr/bin/env python3
|
|
# Copyright 2023 Greptime Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
"""Coverage for query-regression case group selection."""
|
|
|
|
import importlib.util
|
|
import re
|
|
import sys
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
RUNNER_PATH = Path(__file__).parents[2] / ".github/scripts/query-regression-run.py"
|
|
SPEC = importlib.util.spec_from_file_location("query_regression_run_under_test", RUNNER_PATH)
|
|
assert SPEC is not None and SPEC.loader is not None
|
|
runner = importlib.util.module_from_spec(SPEC)
|
|
sys.modules[SPEC.name] = runner
|
|
SPEC.loader.exec_module(runner)
|
|
|
|
|
|
class QueryRegressionCaseSelectionTest(unittest.TestCase):
|
|
def test_all_selects_the_routine_default_cases(self) -> None:
|
|
self.assertEqual(
|
|
runner.split_cases(["all"]),
|
|
[
|
|
"tests/perf/query_cases/smoke_direct_sst/case.toml",
|
|
"tests/perf/query_cases/sst_float_bss/case.toml",
|
|
"tests/perf/query_cases/prom_remote_write_seeded_random/case.toml",
|
|
"tests/perf/query_cases/prom_remote_write_run_heavy/case.toml",
|
|
"tests/perf/query_cases/prom_remote_write_mixed_every/case.toml",
|
|
"tests/perf/query_cases/prom_remote_write_integer_counter/case.toml",
|
|
"tests/perf/query_cases/promql_range_boundary/case.toml",
|
|
"tests/perf/query_cases/promql_instant_last_row_9034/case.toml",
|
|
"tests/perf/query_cases/mito_prefilter_all_match/case.toml",
|
|
],
|
|
)
|
|
|
|
def test_implicit_selection_has_nine_routine_cases(self) -> None:
|
|
self.assertEqual(len(runner.DEFAULT_CASES), 9)
|
|
self.assertEqual(runner.split_cases([]), runner.DEFAULT_CASES)
|
|
|
|
def test_heavy_selects_only_remote_write_7913(self) -> None:
|
|
self.assertEqual(
|
|
runner.split_cases(["heavy"]),
|
|
["tests/perf/query_cases/prom_remote_write_7913/case.toml"],
|
|
)
|
|
|
|
def test_explicit_paths_remain_selectable(self) -> None:
|
|
case = "tests/perf/query_cases/sql_topk_order_by/case.toml"
|
|
self.assertEqual(runner.split_cases([case]), [case])
|
|
|
|
def test_sst_float_bss_omits_base_encoding_for_older_binaries(self) -> None:
|
|
case_path = Path(__file__).parent / "query_cases/sst_float_bss/case.toml"
|
|
setup_sql = dict(re.findall(
|
|
r'(base|candidate)_setup_sql = \[\s*"([^"\n]+)"',
|
|
case_path.read_text(),
|
|
))
|
|
base_setup = setup_sql["base"]
|
|
candidate_setup = setup_sql["candidate"]
|
|
candidate_option = "'experimental_sst_float_field_encoding'='byte_stream_split'"
|
|
|
|
self.assertNotIn("experimental_sst_float_field_encoding", base_setup)
|
|
self.assertIn(candidate_option, candidate_setup)
|
|
self.assertEqual(
|
|
base_setup,
|
|
candidate_setup.replace(f", {candidate_option}", ""),
|
|
)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|