Skip to content

Commit 2407358

Browse files
authored
Adding profiling option to checkVec task (#129502)
Adds simple profiling to checkVec. ``` DO_PROFILING=true ./gradlew :qa:vector:checkVec --args=/path/to/config.json ```
1 parent e437163 commit 2407358

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

qa/vector/build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ tasks.register("checkVec", JavaExec) {
4242
systemProperty "es.logger.out", "console"
4343
systemProperty "es.logger.level", "INFO" // Change to DEBUG if needed
4444
systemProperty 'es.nativelibs.path', TestUtil.getTestLibraryPath(file("../../libs/native/libraries/build/platform/").toString())
45-
45+
jvmArgs '-Xms4g', '-Xmx4g', '-Djava.util.concurrent.ForkJoinPool.common.parallelism=8', '-XX:+UnlockDiagnosticVMOptions', '-XX:+DebugNonSafepoints', '-XX:+HeapDumpOnOutOfMemoryError'
4646
if (buildParams.getRuntimeJavaVersion().map { it.majorVersion.toInteger() }.get() >= 21) {
47-
jvmArgs '-Xms4g', '-Xmx4g', '--add-modules=jdk.incubator.vector', '--enable-native-access=ALL-UNNAMED', '-Djava.util.concurrent.ForkJoinPool.common.parallelism=8', '-XX:+UnlockDiagnosticVMOptions', '-XX:+DebugNonSafepoints', '-XX:+HeapDumpOnOutOfMemoryError'
47+
jvmArgs '--add-modules=jdk.incubator.vector', '--enable-native-access=ALL-UNNAMED'
48+
}
49+
if (System.getenv("DO_PROFILING") != null) {
50+
jvmArgs '-XX:StartFlightRecording=dumponexit=true,maxsize=250M,filename=knn.jfr,settings=profile.jfc'
4851
}
4952
}
5053

0 commit comments

Comments
 (0)