.withRequiredArg().ofType(Integer.class).defaultsTo(20);
OptionSpec<Boolean> report = parser.accepts("report", "Whether to output intermediate results")
.withOptionalArg().ofType(Boolean.class)
.defaultsTo(Boolean.FALSE);
OptionSet options = parser.parse(args);
int cacheSize = cache.value(options);
RepositoryFixture[] allFixtures = new RepositoryFixture[] {
new JackrabbitRepositoryFixture(
base.value(options), cacheSize),
OakRepositoryFixture.getMemory(cacheSize * MB),
OakRepositoryFixture.getDefault(
base.value(options), cacheSize * MB),
OakRepositoryFixture.getMongo(
host.value(options), port.value(options),
dbName.value(options), dropDBAfterTest.value(options),
cacheSize * MB),
OakRepositoryFixture.getSegment(
host.value(options), port.value(options), cacheSize * MB),
OakRepositoryFixture.getTar(
base.value(options), 256 * 1024 * 1024, mmap.value(options))
};
Benchmark[] allBenchmarks = new Benchmark[] {
new LoginTest(),
new LoginLogoutTest(),
new NamespaceTest(),
new ReadPropertyTest(),
GetNodeTest.withAdmin(),
GetNodeTest.withAnonymous(),
new GetDeepNodeTest(),
new SetPropertyTest(),
new SmallFileReadTest(),
new SmallFileWriteTest(),
new ConcurrentReadTest(),
new ConcurrentReadWriteTest(),
new ConcurrentWriteReadTest(),
new ConcurrentWriteTest(),
new SimpleSearchTest(),
new SQL2SearchTest(),
new DescendantSearchTest(),
new SQL2DescendantSearchTest(),
new CreateManyChildNodesTest(),
new UpdateManyChildNodesTest(),
new TransientManyChildNodesTest(),
new WikipediaImport(wikipedia.value(options)),
new CreateNodesBenchmark(),
new ManyNodes(),
new ObservationTest(),
new XmlImportTest(),
new FlatTreeWithAceForSamePrincipalTest(),
new ReadDeepTreeTest(
runAsAdmin.value(options),
itemsToRead.value(options),
report.value(options)),
new ConcurrentReadAccessControlledTreeTest(
runAsAdmin.value(options),
itemsToRead.value(options),
bgReaders.value(options),
report.value(options)),
new ConcurrentReadDeepTreeTest(
runAsAdmin.value(options),
itemsToRead.value(options),
bgReaders.value(options),
report.value(options)),
ReadManyTest.linear("LinearReadEmpty", 1, ReadManyTest.EMPTY),
ReadManyTest.linear("LinearReadFiles", 1, ReadManyTest.FILES),
ReadManyTest.linear("LinearReadNodes", 1, ReadManyTest.NODES),
ReadManyTest.uniform("UniformReadEmpty", 1, ReadManyTest.EMPTY),
ReadManyTest.uniform("UniformReadFiles", 1, ReadManyTest.FILES),
ReadManyTest.uniform("UniformReadNodes", 1, ReadManyTest.NODES),
};
Set<String> argset = Sets.newHashSet(options.nonOptionArguments());
List<RepositoryFixture> fixtures = Lists.newArrayList();
for (RepositoryFixture fixture : allFixtures) {
if (argset.remove(fixture.toString())) {
fixtures.add(fixture);
}