Skip to content

Remove obsolete benchmarks and timing-only unit tests - #19538

Merged
xiangfu0 merged 2 commits into
apache:masterfrom
xiangfu0:xiangfu0/cleanup-benchmark-tests
Sep 14, 2026
Merged

xiangfu0 merged 2 commits into
apache:masterfrom
xiangfu0:xiangfu0/cleanup-benchmark-tests

Conversation

@xiangfu0

Copy link
Copy Markdown
Contributor

Summary

The benchmark module contains duplicate workloads, retired implementation experiments, and standalone runners that no longer produce useful measurements. Normal unit-test runs also include an ad hoc interner benchmark with about 737 million calls and a 400,000-segment retention test that only checks elapsed time.

Remove 10 obsolete benchmark classes, the unused LazyDataList helper, three unregistered off-heap ID-map methods, and five obsolete launcher entries. Add a README guide pointing to current workload benchmarks. Production behavior is unchanged.

Benchmark removals

Removed benchmark Reason
BenchmarkSumQuery Exact SUM workload duplicate of retained SumIntAggregationFunctionBenchmark, which also compares SUMINT.
StringDictionaryPerfTest Deletes its segment after lookup, then attempts to reload it for the next measurement; retained JMH dictionary benchmarks cover lookup and reads.
RawIndexBenchmark Reads STRING columns through numeric conversion and measures v1-style files although new segments default to v3; retain current raw reader/writer benchmarks.
ForwardIndexWriterBenchmark Unfinished file-based size experiment with an unpopulated offsets array and no timing.
BenchmarkOffHeapDictionaryMemory Standalone runner never initializes its memory manager; retain the working dictionary capacity/overflow benchmark.
BenchmarkQueryEngine Hard-coded data-directory/table template with only COUNT and no teardown; use the configurable driver or current SSQE/MSQE workloads.
BenchmarkRoaringBitmapCreation Measures benchmark-local copies of retired SoftReference cache implementations rather than the current index reader.
BenchmarkRoaringBitmapMapping Requires external, unprovided fixtures and compares algorithms that discard different trailing results.
BenchmarkJsonKeyMap Retired map/concatenation experiment; one variant fills a different map from the one it clears and returns.
BenchmarkGroovyExpressionEvaluation Generic Java/Groovy comparison bypasses Pinot's evaluator, times input generation, and discards results.

Keep benchmarks for current query, index, dictionary, aggregation, JSON/MAP, ingestion, resource-accounting, and vector paths, including meaningful implementation and algorithm baselines. The removed experiments do not all have one-to-one replacements; current workload coverage remains.

Unit-test cleanup

  • Remove those two timing-only tests and their unused helper code, plus the three disabled methods in VectorSearchBenchmark.
  • Preserve the HDFS batch-deletion assertions while removing its elapsed-time threshold.
  • Rename the ten-value ANY_VALUE test to describe its correctness coverage, and make the interner helper always assert equality.

The remaining correctness-test datasets and assertions are unchanged.

How to reproduce

On the base revision, run the interner benchmark through the normal unit-test runner:

./mvnw -pl pinot-common -am \
  '-Dtest=FALFInternerTest#benchmarkingTest' \
  -Dsurefire.failIfNoSpecifiedTests=false test

The selected method repeatedly interns values and prints timings without checking correctness. The cleanup removes that method while retaining testInterningByteBuffers and its assertions. The retention benchmark similarly checks only a 30-second threshold; existing retention tests continue to verify tracked-segment exclusion and deletion candidates.

Validation

Using JDK 25, 136 focused tests passed with no failures, errors, or skips:

./mvnw -pl pinot-common,pinot-core,pinot-controller,pinot-segment-local,pinot-plugins/pinot-file-system/pinot-hdfs -am \
  -Dtest=FALFInternerTest,RetentionManagerTest,AnyValueAggregationFunctionTest,HadoopPinotFSTest,IvfFlatVectorIndexTest,IvfFlatFilterAwareTest,ScalarQuantizerTest \
  -Dsurefire.failIfNoSpecifiedTests=false test

Spotless, Checkstyle, license formatting, and license validation passed for all five affected modules. Isolated javac -Xlint:all checks passed for all four modified test classes with no warnings on added lines. The additional reactor build with expanded deprecation checking hit the existing missing JetBrains NotNull annotation dependency in unchanged ZstandardDecompressor; the normal reactor build and tests passed.

For the benchmark module, all four style/license checks passed. The complete 64-module reactor package build passed:

./mvnw -pl pinot-perf -am -Ppinot-fastdev -DskipTests package

JMH discovery from the generated package lists 302 retained benchmark methods; removed benchmarks are absent. All 16 generated launcher scripts reference existing classes, and the five retired launchers are absent.

Forked smoke runs passed for the retained SUM and dictionary-lookup workloads. These runs validate execution only:

java @.mvn/jvm.config -cp 'pinot-perf/target/pinot-perf-pkg/lib/*' org.openjdk.jmh.Main \
  'SumIntAggregationFunctionBenchmark.testSumAggregation$' \
  -p _nullHandling=false -p _nullPeriod=16 -f 1 -wi 0 -i 1 -r 100ms -foe true
java @.mvn/jvm.config -cp 'pinot-perf/target/pinot-perf-pkg/lib/*' org.openjdk.jmh.Main \
  'BenchmarkDictionaryLookup.benchmarkPlainBinarySearch$' \
  -p _cardinality=100 -p _lookupPercentage=100 -f 1 -wi 0 -i 1 -r 100ms -foe true

Remove timing-only interner and retention tests and the disabled vector
benchmark class. Preserve functional assertions, remove the HDFS deletion
timing threshold, and give the ANY_VALUE test a correctness-focused name.

How to reproduce:
On the parent revision, run FALFInternerTest#benchmarkingTest through
./mvnw -pl pinot-common -am -Dsurefire.failIfNoSpecifiedTests=false test
with -Dtest=FALFInternerTest#benchmarkingTest. It runs about 737 million
interning calls and prints timings without checking correctness.

Validation: 136 focused tests passed on JDK 25. Spotless, Checkstyle, and
license checks passed. Isolated lint passed for all modified test classes.
Drop ten retired experiments or invalid/duplicate harnesses, their obsolete
launchers, unused LazyDataList, and three unregistered off-heap map methods.
Keep current workload benchmarks and document their entry points.

The removed standalone runners include a dictionary test that reloads its
deleted segment, a memory test that never initializes its memory manager,
and index-size comparisons based on stale v1 file paths or empty offsets.
The removed SUM workload is covered by the retained SUM/SUMINT benchmark.

Validation: all four style/license checks passed for pinot-perf; the
64-module reactor package build passed. JMH discovers 302 retained methods,
all 16 launchers resolve, and forked SUM/dictionary lookup smoke runs pass.
@xiangfu0 xiangfu0 added cleanup Code cleanup or removal of dead code performance Related to performance optimization testing Related to tests or test infrastructure labels Sep 12, 2026
@xiangfu0
xiangfu0 requested review from Jackie-Jiang and yashmayya and removed request for Jackie-Jiang September 12, 2026 22:01
@codecov-commenter

codecov-commenter commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.73%. Comparing base (5771d6a) to head (92c10a6).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #19538      +/-   ##
============================================
+ Coverage     67.72%   67.73%   +0.01%     
  Complexity     1450     1450              
============================================
  Files          3490     3490              
  Lines        225032   225032              
  Branches      35527    35527              
============================================
+ Hits         152393   152418      +25     
+ Misses        60612    60580      -32     
- Partials      12027    12034       +7     
Flag Coverage Δ
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-25 67.73% <ø> (+0.01%) ⬆️
lane-a 100.00% <ø> (ø)
lane-b 0.00% <ø> (ø)
temurin 67.73% <ø> (+0.01%) ⬆️
unittests 67.72% <ø> (+0.01%) ⬆️
unittests1 57.82% <ø> (+0.01%) ⬆️
unittests2 39.49% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiangfu0
xiangfu0 merged commit a6ea7b0 into apache:master Sep 14, 2026
16 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code cleanup or removal of dead code performance Related to performance optimization testing Related to tests or test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants