We defined some tests in order to measure the performance of the interpreter.
The standard test tasks (i.e test and check) execute all tests except for performance tests. For example:
./gradlew check
Performance test are tagged with the @Category(PerformanceTest::class) annotation:
@Test @Category(PerformanceTest::class)
fun executeMUTE10_01_perf_calls() {
assertEquals(LinkedList<String>(), outputOf("performance/MUTE10_01"))
}
At the moment, we collected the performance test .rpgle examples in the performance folder.
To run performance tests (i.e. tests tagged with the annotation @Category(PerformanceTest::class)) use this gradle command:
./gradlew testPerformance
If you want to collect data about failed performance tests, run the task with:
./gradlew testPerformance -DexportCsvFile="/some/file.csv"
You can run all tests at the same time this way:
./gradlew testAll
The configuration of these tasks is defined in build.gradle
test {
...
useJUnit {
excludeCategories 'com.smeup.rpgparser.PerformanceTest'
}
}
task testPerformance(type: Test) {
...
useJUnit {
includeCategories 'com.smeup.rpgparser.PerformanceTest'
}
}