use of oap.tree.Dimension.OperationType.NOT_CONTAINS in project oap by oaplatform.
the class TreePerformance method run.
public void run(double fillFactor, int arrayToTree, int dataCount) {
val bids = new ArrayList<ArrayList<Object>>();
val dimensions = new ArrayList<Dimension>();
addStringDimension(dimensions, 20, Dimension.OperationType.CONTAINS);
addLongDimension(dimensions, 5);
addStringDimension(dimensions, 30, NOT_CONTAINS);
addBooleanDimension(dimensions, 10, Dimension.OperationType.CONTAINS);
addBooleanDimension(dimensions, 10, NOT_CONTAINS);
addEnumDimension(dimensions, TestEnum1.class, TestEnum1.UNKNOWN1);
addEnumDimension(dimensions, TestEnum2.class, TestEnum2.Test21);
addArrayEnumDimension(dimensions, TestEnum3.class, TestEnum3.Test31, 2);
addArrayStringDimension(dimensions, 5, 300);
addArrayStringDimension(dimensions, 5, 3);
addArrayStringDimension(dimensions, 5, 4);
addArrayStringDimension(dimensions, 5, 5);
addArrayLongDimension(dimensions, 5, 4);
addArrayLongDimension(dimensions, 5, 10);
val data = new ArrayList<Tree.ValueData<String>>();
fill(dimensions, data, dataCount);
generateRequests(100, dimensions, bids, data);
final Tree<String> tree = Tree.<String>tree(dimensions).withHashFillFactor(fillFactor).withArrayToTree(arrayToTree).load(data);
benchmark("tree-" + fillFactor + "-" + dataCount, SAMPLES, (i) -> {
Assertions.assertThat(tree.find(bids.get(i % bids.size()))).isNotEmpty();
}).run();
System.out.println(tree.getMaxDepth());
}
Aggregations