Skip to content

Commit

Permalink
Refatorings and Fixings
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTheBeloved committed Jul 5, 2019
1 parent 5942952 commit 381d023
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.javarosa.core.reference.InvalidReferenceException;
import org.javarosa.xml.util.InvalidStructureException;
import org.javarosa.xml.util.UnfullfilledRequirementsException;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Param;
import org.openjdk.jmh.annotations.Scope;
Expand All @@ -33,11 +34,11 @@ public static class ExternalDataInstanceState {
public int noOfQuestions = 1;
public int noOfInternalSecondaryInstances = 0;
@Param({"50", "5000"})
public int noOf2ndryInstanceElements = 1;
public int noOf2ndryInstanceElements = 100;
@Param({"1"})
public int noOfQuestionGroups = 1;
@Param({"50"})
public int noOfExternalSecondaryInstances = 1;
public int noOfExternalSecondaryInstances = 10;
@Setup(Level.Trial)
public void initialize() throws IOException {
Map<String, Path> externalInstanceFiles = BenchmarkUtils.generateExternalSecondaryInstances(noOfQuestions, noOfQuestionGroups, noOfInternalSecondaryInstances, noOfExternalSecondaryInstances, noOf2ndryInstanceElements);
Expand All @@ -49,7 +50,7 @@ public void initialize() throws IOException {

}

//@Benchmark
@Benchmark
public void runBenchmark(ExternalDataInstanceState state, Blackhole bh)
throws IOException, XmlPullParserException, InvalidReferenceException,
UnfullfilledRequirementsException, InvalidStructureException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ public void benchmarkAnswerOne(FormControllerAnswerQuestionState state) throws R
} else {
throw new RuntimeException("Form controller not in a question index");
}
state.formEntryController.jumpToIndex(FormIndex.createBeginningOfFormIndex());
}

private class AnswerCurrentQuestionAction {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void initialize() throws IOException {
}
}

//@Benchmark
@Benchmark
public void runBenchmark(TreeElementParserBenchmarkState state, Blackhole bh) throws IOException, UnfullfilledRequirementsException, XmlPullParserException, InvalidStructureException {
TreeElement documentRootTreeElement = parse(state.xFormFile);
bh.consume(documentRootTreeElement);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void initialize() throws IOException {
}
}

//@Benchmark
@Benchmark
public void
runBenchmark(XFormParserBenchmarkState state, Blackhole bh)
throws IOException {
Expand Down

0 comments on commit 381d023

Please sign in to comment.