Skip to content

Commit

Permalink
Add a test for BenchmarkSortedRangeSet
Browse files Browse the repository at this point in the history
Cherry-pick of trinodb/trino@890e665

Co-authored-by: Piotr Findeisen <[email protected]>
  • Loading branch information
zhenxiao and findepi committed May 18, 2021
1 parent ca09cd3 commit b302af1
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.VerboseMode;
import org.testng.annotations.Test;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -243,6 +244,33 @@ private SortedRangeSet generateRangeSet(int size)
}
}

@Test
public void test()
{
Data data = new Data();
data.init();

benchmarkBuilder(data);

equalsSmall(data);
equalsLarge(data);

unionSmall(data);
unionLarge(data);

overlapsSmall(data);
overlapsLarge(data);

containsValueSmall(data);
containsValueLarge(data);

complementSmall(data);
complementLarge(data);

getOrderedRangesSmall(data);
getOrderedRangesLarge(data);
}

public static void main(String[] args)
throws RunnerException
{
Expand Down

0 comments on commit b302af1

Please sign in to comment.