diff --git a/exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc b/exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc index 8321b285..bdc5f418 100644 --- a/exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc +++ b/exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc @@ -15,8 +15,8 @@ TEST(JavaContainerPerformance, large_inline_java_udf_test) { "class JVMOPTION_TEST_WITH_SPACE {\n" "static void run(ExaMetadata exa, ExaIterator ctx) throws Exception {\n\n"; - for (uint32_t idxLine(0); idxLine < NumInlineJavaLines; idxLine++) { - for (uint32_t idxWord(0); idxWord < NumInlineJavaWordsPerLine; idxWord++) + for (uint32_t idxLine(0); idxLine < NumInlineJavaLines; ++idxLine) { + for (uint32_t idxWord(0); idxWord < NumInlineJavaWordsPerLine; ++idxWord) script_code.append("somecode "); script_code.append("\n"); } @@ -24,4 +24,35 @@ TEST(JavaContainerPerformance, large_inline_java_udf_test) { JavaVMTest vm(script_code); } +TEST(JavaContainerPerformance, large_inline_single_line_full_java_udf_test) { + std::string script_code = + "%jvmoption option1=abc;" + "%jvmoption option2=def;" + "class JVMOPTION_TEST_WITH_SPACE {" + "static void run(ExaMetadata exa, ExaIterator ctx) throws Exception {"; + + for (uint32_t idxLine(0); idxLine < NumInlineJavaLines; ++idxLine) { + for (uint32_t idxWord(0); idxWord < NumInlineJavaWordsPerLine; ++idxWord) + script_code.append("somecode "); + + } + script_code.append(" }}"); + JavaVMTest vm(script_code); +} + +TEST(JavaContainerPerformance, large_inline_single_line_slim_java_udf_test) { + std::string script_code = + "%jvmoption option1=abc;" + "%jvmoption option2=def;" + "class JVMOPTION_TEST_WITH_SPACE {" + "static void run(ExaMetadata exa, ExaIterator ctx) throws Exception {"; + + for (uint32_t idxLine(0); idxLine < NumInlineJavaLines / 10; ++idxLine) { + for (uint32_t idxWord(0); idxWord < NumInlineJavaWordsPerLine / 10; ++idxWord) + script_code.append("someco%de ; \\t"); + + } + script_code.append(" }}"); + JavaVMTest vm(script_code); +}