reuvenlax commented on code in PR #41544:
URL: https://github.com/apache/beam/pull/41544#discussion_r4672863974


##########
runners/google-cloud-dataflow-java/worker/jmh/src/main/java/org/apache/beam/runners/dataflow/worker/jmh/ShuffleReadPathBenchmark.java:
##########
@@ -0,0 +1,303 @@
+/*
+ * 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.beam.runners.dataflow.worker.jmh;
+
+import java.io.Closeable;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.NoSuchElementException;
+import java.util.concurrent.TimeUnit;
+import org.apache.beam.runners.core.NullSideInputReader;
+import org.apache.beam.runners.dataflow.worker.BatchModeExecutionContext;
+import org.apache.beam.runners.dataflow.worker.DataflowOperationContext;
+import org.apache.beam.runners.dataflow.worker.GroupingShuffleReader;
+import org.apache.beam.runners.dataflow.worker.WorkerJmhAccess;
+import org.apache.beam.runners.dataflow.worker.counters.NameContext;
+import org.apache.beam.runners.dataflow.worker.util.BatchGroupAlsoByWindowFn;
+import 
org.apache.beam.runners.dataflow.worker.util.BatchGroupAlsoByWindowsDoFns;
+import 
org.apache.beam.runners.dataflow.worker.util.common.worker.ByteArrayShufflePosition;
+import 
org.apache.beam.runners.dataflow.worker.util.common.worker.GroupingShuffleEntryIterator;
+import 
org.apache.beam.runners.dataflow.worker.util.common.worker.KeyGroupedShuffleEntries;
+import 
org.apache.beam.runners.dataflow.worker.util.common.worker.NativeReader.NativeReaderIterator;
+import org.apache.beam.runners.dataflow.worker.util.common.worker.ShuffleEntry;
+import 
org.apache.beam.runners.dataflow.worker.util.common.worker.ShuffleEntryReader;
+import 
org.apache.beam.runners.dataflow.worker.util.common.worker.ShufflePosition;
+import org.apache.beam.sdk.coders.BigEndianLongCoder;
+import org.apache.beam.sdk.coders.Coder;
+import org.apache.beam.sdk.coders.IterableCoder;
+import org.apache.beam.sdk.coders.KvCoder;
+import org.apache.beam.sdk.options.PipelineOptions;
+import org.apache.beam.sdk.options.PipelineOptionsFactory;
+import org.apache.beam.sdk.transforms.windowing.FixedWindows;
+import org.apache.beam.sdk.transforms.windowing.GlobalWindow;
+import org.apache.beam.sdk.transforms.windowing.IntervalWindow;
+import org.apache.beam.sdk.transforms.windowing.PaneInfo;
+import org.apache.beam.sdk.util.CoderUtils;
+import org.apache.beam.sdk.util.common.Reiterable;
+import org.apache.beam.sdk.util.common.Reiterator;
+import org.apache.beam.sdk.values.KV;
+import org.apache.beam.sdk.values.WindowedValue;
+import org.apache.beam.sdk.values.WindowedValues;
+import org.apache.beam.sdk.values.WindowingStrategy;
+import org.apache.beam.vendor.grpc.v1p69p0.com.google.protobuf.ByteString;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.joda.time.Duration;
+import org.joda.time.Instant;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.infra.Blackhole;
+
+/**
+ * Microbenchmarks for Dataflow Runner v1 shuffle read and GroupAlsoByWindow 
iteration hot paths:
+ * {@link GroupingShuffleEntryIterator}, {@link GroupingShuffleReader}, and 
{@link
+ * BatchGroupAlsoByWindowsDoFns}.
+ */
+@BenchmarkMode(Mode.Throughput)
+@OutputTimeUnit(TimeUnit.MICROSECONDS)
+public class ShuffleReadPathBenchmark {

Review Comment:
   just removed this file for now. the PR that improves shuffle contains a 
more-thorough benchmark anyway. (also it's runner v1 and batch defaults to 
runner v2, so unclear if this is interesting).



-- 
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