_"A journey of a thousand miles begins with a single step" Lao Tzu_ ScyllaDB uses estimated_histogram in many places. We already have a more efficient alternative: approx_exponential_histogram. It is both CPU and memory-efficient and can be exported as Prometheus native histograms. Its main limitation (which has its benefits) is that the bucket layout is fixed at compile time, so histograms with different configurations cannot be mixed. The end goal is to replace all uses of estimated_histogram in the codebase. That migration needs a few small API adjustments, so I am splitting the work into steps for easier review. This series is the first step. It introduces a base template for fixed-size estimated histograms, and switches the Alternator's estimated_histogram with the template. This change is self-contained and valuable on its own, while keeping the scope limited. Minor adjustments were made to the code and tests so that the tests would pass. Follow-up PRs will apply the same pattern to the rest of the code. **New feature no need to backport** Closes scylladb/scylladb#28987 * github.com:scylladb/scylladb: alternator: migrate to operation_size_kb histograms test/alternator/test_metrics.py: Update the bucket in the histogram search alternator: Use batch_histogram for batch size histograms estimated_histogram.hh: adds estimated_histogram_with_max
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.