SamBarker commented on code in PR #90:
URL: https://github.com/apache/flink-benchmarks/pull/90#discussion_r1615419310


##########
pom.xml:
##########
@@ -290,25 +291,31 @@ under the License.
                                                <configuration>
                                                        
<skip>${skipTests}</skip>
                                                        
<classpathScope>test</classpathScope>
-                                                       
<executable>${executableJava}</executable>
+                                                       
<executable>${basedir}/benchmark.sh</executable>

Review Comment:
   updated for consistency.



##########
pom.xml:
##########
@@ -536,6 +543,19 @@ under the License.
                                </plugins>
                        </build>
                </profile>
+
+               <profile>
+                       <activation>
+                               <activeByDefault>false</activeByDefault>
+                               <property>
+                                       <name>asyncProfilerLib</name>
+                               </property>
+                       </activation>
+                       <id>enable-async-profiler</id>
+                       <properties>
+                               
<jmhProfArgument>async:libPath=${asyncProfilerLib};output=flamegraph;dir=/tmp/profile-results</jmhProfArgument>

Review Comment:
   `libPath` is user and platform specific so I don't think we can sensibly 
default it.



##########
benchmark.sh:
##########
@@ -0,0 +1,54 @@
+#!/usr/bin/env bash
+
+JAVA_ARGS=()
+JMH_ARGS=()
+BINARY="java"
+BENCHMARK_PATTERN=
+
+while getopts ":j:c:b:e:p:a:m:h" opt; do
+  case $opt in
+    j) JAVA_ARGS+=("${OPTARG}")
+    ;;
+    c) CLASSPATH_ARG="${OPTARG}"
+    ;;
+    b) BINARY="${OPTARG}"
+    ;;
+    p) PROFILER_ARG="${OPTARG:+-prof ${OPTARG}}"

Review Comment:
   This is the core motivation for the change. If `-p` is specified with an non 
empty value this will set `PROFILER_ARG` to `-prof ${OPTARG}`. Without this it 
would end up adding `-prof " "` and thus JMH fails to initialise. 



##########
pom.xml:
##########
@@ -290,25 +291,31 @@ under the License.
                                                <configuration>
                                                        
<skip>${skipTests}</skip>
                                                        
<classpathScope>test</classpathScope>
-                                                       
<executable>${executableJava}</executable>
+                                                       
<executable>${basedir}/benchmark.sh</executable>
                                                        <arguments>
-                                                               
<argument>-Xmx6g</argument>
-                                                               
<argument>-classpath</argument>
+                                                               
<argument>-c</argument>
                                                                <classpath/>
-                                                               
<argument>org.openjdk.jmh.Main</argument>
-                                                               
<!--shouldFailOnError-->
-                                                               
<argument>-foe</argument>
-                                                               
<argument>true</argument>
+                                                               
<argument>-b</argument>
+                                                               
<argument>${executableJava}</argument>
+                                                               
<argument>-j</argument>
+                                                               
<argument>-Xmx6g</argument>
                                                                <!--speed up 
tests-->
+                                                               
<argument>-a</argument>

Review Comment:
   gets a bit verbose. I guess the alternative would be to pass all the JMH 
args as a single string.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to