-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
exaudfclient/base/javacontainer/test/cpp/javacontainer_perf_test.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "include/gtest/gtest.h" | ||
#include "gmock/gmock.h" | ||
#include "base/javacontainer/test/cpp/javavm_test.h" | ||
#include "base/javacontainer/test/cpp/swig_factory_test.h" | ||
#include <string.h> | ||
|
||
const uint32_t NumInlineJavaLines = 500000; | ||
const uint32_t NumInlineJavaWordsPerLine = 100; | ||
|
||
|
||
TEST(JavaContainerPerformance, large_inline_java_udf_test) { | ||
std::string script_code = | ||
"%jvmoption option1=abc;\n" | ||
"%jvmoption option2=def;\n" | ||
"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++) | ||
script_code.append("somecode "); | ||
script_code.append("\n"); | ||
} | ||
script_code.append(" }\n}\n"); | ||
JavaVMTest vm(script_code); | ||
} | ||
|
||
|