[ 
https://issues.apache.org/jira/browse/BEAM-5983?focusedWorklogId=164525&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-164525
 ]

ASF GitHub Bot logged work on BEAM-5983:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Nov/18 21:58
            Start Date: 09/Nov/18 21:58
    Worklog Time Spent: 10m 
      Work Description: aaltay commented on a change in pull request #6985: 
[BEAM-5983] Create Combine load test
URL: https://github.com/apache/beam/pull/6985#discussion_r232406012
 
 

 ##########
 File path: 
sdks/java/testing/load-tests/src/main/java/org/apache/beam/sdk/loadtests/CombineLoadTest.java
 ##########
 @@ -0,0 +1,148 @@
+/*
+ * 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.sdk.loadtests;
+
+import static java.lang.String.format;
+
+import com.google.common.base.Preconditions;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.util.Optional;
+import org.apache.beam.sdk.io.synthetic.SyntheticBoundedIO;
+import org.apache.beam.sdk.io.synthetic.SyntheticStep;
+import org.apache.beam.sdk.loadtests.metrics.MetricsMonitor;
+import org.apache.beam.sdk.options.Default;
+import org.apache.beam.sdk.options.Description;
+import org.apache.beam.sdk.transforms.Combine;
+import org.apache.beam.sdk.transforms.MapElements;
+import org.apache.beam.sdk.transforms.Mean;
+import org.apache.beam.sdk.transforms.ParDo;
+import org.apache.beam.sdk.transforms.SimpleFunction;
+import org.apache.beam.sdk.transforms.Top;
+import org.apache.beam.sdk.values.KV;
+import org.apache.beam.sdk.values.PCollection;
+
+/**
+ * Load test for {@link ParDo} operation.
+ *
+ * <p>The purpose of this test is to measure {@link Combine}'s behaviour in 
stressful conditions. It
+ * uses {@link SyntheticBoundedIO} and {@link SyntheticStep} which both can be 
parametrized to
+ * generate keys and values of various size, impose delay (sleep or cpu 
burnout) in various moments
+ * during the pipeline execution and provide some other performance challenges.
+ *
+ * @see SyntheticStep
+ * @see SyntheticBoundedIO
+ *     <p>You can choose between multiple combine modes to test per key 
combine operations ({@link
+ *     CombinerType}).
+ *     <p>To run it manually, use the following command:
+ *     <pre>
+ *    ./gradlew :beam-sdks-java-load-tests:run -PloadTest.args='
+ *      --fanout=1
+ *      --perKeyCombinerType=TOP_LARGEST
+ *      --topCount=10
+ *      --sourceOptions={"numRecords":1000,...}
+ *      --stepOptions={"outputRecordsPerInputRecord":2...}'
+ *      -PloadTest.mainClass="org.apache.beam.sdk.loadtests.CombineLoadTest"
+ * </pre>
+ */
+public class CombineLoadTest extends LoadTest<CombineLoadTest.Options> {
+
+  private static final String METRICS_NAMESPACE = "combine";
+
+  private enum CombinerType {
+    TOP_LARGEST,
+    MEAN
+  }
+
+  /** Pipeline options specific for this test. */
+  interface Options extends LoadTestOptions {
 
 Review comment:
   Could we have some standard configs to run this load test? Perhaps a wrapper 
to run this with a set of parameters
   
   I can think of:
   Uniform
   Normal
   Onekey
   Fanout 256 (could be uniform)
   (+ maybe a few hot keys in a larger distribution.)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 164525)
    Time Spent: 0.5h  (was: 20m)

> Create Combine load test for Java SDK
> -------------------------------------
>
>                 Key: BEAM-5983
>                 URL: https://issues.apache.org/jira/browse/BEAM-5983
>             Project: Beam
>          Issue Type: Sub-task
>          Components: testing
>            Reporter: Lukasz Gajowy
>            Assignee: Lukasz Gajowy
>            Priority: Minor
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> This is more thoroughly described in this proposal: 
> [https://docs.google.com/document/d/1PuIQv4v06eosKKwT76u7S6IP88AnXhTf870Rcj1AHt4/edit?usp=sharing]
>  
> In short: this ticket is about implementing the Combine load test that uses 
> SyntheticStep and Synthetic source to create load on the pipeline. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to