1996fanrui commented on code in PR #77:
URL: https://github.com/apache/flink-benchmarks/pull/77#discussion_r1251079893


##########
src/main/java/org/apache/flink/benchmark/WatermarkAggregationBenchmark.java:
##########
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.flink.benchmark;
+
+import 
org.apache.flink.runtime.source.coordinator.SourceCoordinatorAlignmentBenchmark;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Level;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.Param;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.runner.Runner;
+import org.openjdk.jmh.runner.RunnerException;
+import org.openjdk.jmh.runner.options.Options;
+import org.openjdk.jmh.runner.options.OptionsBuilder;
+import org.openjdk.jmh.runner.options.VerboseMode;
+
+/** The watermark aggregation benchmark for source coordinator when enabling 
the watermark alignment. */
+@BenchmarkMode(Mode.AverageTime)

Review Comment:
   Thanks @pnowojski for the review and great suggestion.
   
   I have updated this PR based on your suggestion:
   
   - Using the `Throughput` instead of `AverageTime`
   - Add the ` @OperationsPerInvocation(NUM_SUBTASKS * ROUND_PER_INVOCATION)`
   - Just keep the NUM_SUBTASKS=5000.
   - Remove the TimestampType
   
   Following the the benchmark result:
   
   ```
   The master branch with https://github.com/apache/flink/pull/22852
   Benchmark                                          Mode  Cnt    Score    
Error   Units
   WatermarkAggregationBenchmark.aggregateWatermark  thrpt   10  918.466 ± 
61.587  ops/ms
   
   The master branch
   Benchmark                                          Mode  Cnt   Score   Error 
  Units
   WatermarkAggregationBenchmark.aggregateWatermark  thrpt   10  10.474 ± 1.657 
 ops/ms
   ```
   
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to