use of org.apache.jackrabbit.oak.plugins.observation.ChangeSet in project jackrabbit-oak by apache.
the class ChangeSetFilterImplTest method manyIncludePaths.
@Test
public void manyIncludePaths() throws Exception {
int numPaths = 50;
ChangeSetBuilder builder = newBuilder(50, 9);
for (int i = 0; i < numPaths; i++) {
builder.addParentPath("/a/b/c/d/e/n" + i);
}
ChangeSet cs = builder.build();
Set<String> includes = Sets.newHashSet();
for (int i = 0; i < 100; i++) {
includes.add("/foo/bar/n-" + i + "/*.jsp");
}
ChangeSetFilter filter = new ChangeSetFilterImpl(s(), true, includes, s(), s(), s(), s());
// warm up
doManyIncludePaths(filter, cs);
// and measure
Stopwatch sw = Stopwatch.createStarted();
doManyIncludePaths(filter, cs);
LOG.info("manyIncludePaths() took {}", sw.stop());
}
Aggregations