This series closes a gap in the approx_exponential_histogram implementation to cover integer values starting from small Min values. While the original implementation was focused on durations, where this limitation was not an issue, over time, there has been a growing need for histograms that cover smaller values, such as the number of SSTables or the number of items in a batch. The reason for the original limitation is inherent to the exponential histogram math. The previous code required Min to be at least Precision to avoid negative bit shifts in the exponential calculations. After this series, approx_exponential_histogram allows Min to be smaller than Precision by scaling values during indexing. The value is shifted left by log2 Precision minus log2 Min or zero whichever is larger, and the existing exponential math is applied. Bucket limits are then scaled back to the original units. This keeps insertion and retrieval O(1) without runtime branching, at the cost of repeated bucket limits for some values in the Min to Precision range. Additional tests cover the new behavior. Relates to #2785 ** New feature, no need to backport. ** Closes scylladb/scylladb#28371 * github.com:scylladb/scylladb: estimated_histogram_test.cc: add to_metrics_histogram test histogram_metrics_helper.hh: Support Min < Precision estimated_histogram_test.cc: Add tests for approx_exponential_histogram with Min<Precision estimated_histogram.hh: support Min less than Precision histograms
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.