beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject [41/50] incubator-beam git commit: Remove microbenchmarks directory from Beam
Date Tue, 22 Nov 2016 20:11:45 GMT
Remove microbenchmarks directory from Beam

The microbenchmarks should not be released as part of the Beam
distribution, rather they exist for internal measurements and testing.

Given that we also don't have any automatic monitoring (and that any
such measurements are not indicative of real performance), the value of
maintaining microbenchmarks here is negligible.


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/1b520708
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/1b520708
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/1b520708

Branch: refs/heads/python-sdk
Commit: 1b5207084942e3eeefd1f35c5e34f7943704e19e
Parents: 869d082
Author: bchambers <bchambers@google.com>
Authored: Mon Nov 21 13:35:39 2016 -0800
Committer: Davor Bonaci <davor@google.com>
Committed: Mon Nov 21 14:32:27 2016 -0800

----------------------------------------------------------------------
 sdks/java/microbenchmarks/README.md             |  42 ----
 sdks/java/microbenchmarks/pom.xml               | 113 ---------
 .../coders/AvroCoderBenchmark.java              | 119 ----------
 .../coders/ByteArrayCoderBenchmark.java         |  64 -----
 .../coders/CoderBenchmarking.java               |  41 ----
 .../coders/StringUtf8CoderBenchmark.java        |  70 ------
 .../microbenchmarks/coders/package-info.java    |  22 --
 .../transforms/DoFnInvokersBenchmark.java       | 232 -------------------
 .../transforms/package-info.java                |  22 --
 sdks/java/pom.xml                               |   1 -
 10 files changed, 726 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/README.md
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/README.md b/sdks/java/microbenchmarks/README.md
deleted file mode 100644
index 627e669..0000000
--- a/sdks/java/microbenchmarks/README.md
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-    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.
--->
-
-# Microbenchmarks for parts of the Beam SDK
-
-To run benchmarks:
-
- 1. Run `mvn install` in the top directory to install the SDK.
-
- 2. Build the benchmark package:
-
-        cd microbenchmarks
-        mvn package
-
- 3. run benchmark harness:
-
-        java -jar target/microbenchmarks.jar
-
- 4. (alternate to step 3)
-    to run just a subset of benchmarks, pass a regular expression that
-    matches the benchmarks you want to run (this can match against the class
-    name, or the method name).  E.g., to run any benchmarks with
-    "DoFnReflector" in the name:
-
-        java -jar target/microbenchmarks.jar ".*DoFnReflector.*"
-

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/pom.xml b/sdks/java/microbenchmarks/pom.xml
deleted file mode 100644
index 06bc4df..0000000
--- a/sdks/java/microbenchmarks/pom.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-    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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.beam</groupId>
-    <artifactId>beam-sdks-java-parent</artifactId>
-    <version>0.4.0-incubating-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-
-  <artifactId>beam-sdks-java-microbenchmarks</artifactId>
-  <name>Apache Beam :: SDKs :: Java :: Microbenchmarks</name>
-  <description>Microbenchmarks for components in the Beam Java SDK.</description>
-  <packaging>jar</packaging>
-
-  <build>
-    <pluginManagement>
-      <plugins>
-        <!-- BEAM-926 -->
-        <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>findbugs-maven-plugin</artifactId>
-          <configuration>
-            <skip>true</skip>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-shade-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>package</phase>
-            <goals>
-              <goal>shade</goal>
-            </goals>
-            <configuration>
-              <finalName>microbenchmarks</finalName>
-              <transformers>
-                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
-                  <mainClass>org.openjdk.jmh.Main</mainClass>
-                </transformer>
-              </transformers>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.beam</groupId>
-      <artifactId>beam-sdks-java-core</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>joda-time</groupId>
-      <artifactId>joda-time</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-jdk14</artifactId>
-      <!-- When loaded at runtime this will wire up slf4j to the JUL backend -->
-      <scope>runtime</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.openjdk.jmh</groupId>
-      <artifactId>jmh-core</artifactId>
-      <version>1.0.1</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.openjdk.jmh</groupId>
-      <artifactId>jmh-generator-annprocess</artifactId>
-      <version>1.6.1</version>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/AvroCoderBenchmark.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/AvroCoderBenchmark.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/AvroCoderBenchmark.java
deleted file mode 100644
index 35d5add..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/AvroCoderBenchmark.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.microbenchmarks.coders;
-
-import java.io.IOException;
-import java.util.Arrays;
-import org.apache.beam.sdk.coders.AvroCoder;
-import org.apache.beam.sdk.coders.DefaultCoder;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Param;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Warmup;
-
-/**
- * Benchmarks for {@link AvroCoder}.
- */
-@State(Scope.Benchmark)
-@Fork(1)
-@Warmup(iterations = 5)
-public class AvroCoderBenchmark {
-
-  @DefaultCoder(AvroCoder.class)
-  private static class Pojo {
-    public String text;
-    public int count;
-
-    // Empty constructor required for Avro decoding.
-    @SuppressWarnings("unused")
-    public Pojo() {
-    }
-
-    public Pojo(String text, int count) {
-      this.text = text;
-      this.count = count;
-    }
-
-    // auto-generated
-    @Override
-    public boolean equals(Object o) {
-      if (this == o) {
-        return true;
-      }
-      if (o == null || getClass() != o.getClass()) {
-        return false;
-      }
-
-      Pojo pojo = (Pojo) o;
-
-      if (count != pojo.count) {
-        return false;
-      }
-      if (text != null
-          ? !text.equals(pojo.text)
-          : pojo.text != null) {
-        return false;
-      }
-
-      return true;
-    }
-
-    @Override
-    public int hashCode() {
-      return 0;
-    }
-
-    @Override
-    public String toString() {
-      return "Pojo{"
-          + "text='" + text + '\''
-          + ", count=" + count
-          + '}';
-    }
-  }
-
-  AvroCoder<Pojo> coder = AvroCoder.of(Pojo.class);
-
-  @Param({"true", "false"})
-  boolean isWholeStream;
-
-  Pojo shortPojo;
-  Pojo longPojo;
-
-  @Setup
-  public void setUp() {
-    shortPojo = new Pojo("hello world", 42);
-
-    char[] bytes60k = new char[60 * 1024];
-    Arrays.fill(bytes60k, 'a');
-    longPojo = new Pojo(new String(bytes60k), 42);
-  }
-
-  @Benchmark
-  public Pojo codeShortPojo() throws IOException {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, shortPojo);
-  }
-
-  @Benchmark
-  public Pojo codeLongPojo() throws Exception {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, longPojo);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/ByteArrayCoderBenchmark.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/ByteArrayCoderBenchmark.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/ByteArrayCoderBenchmark.java
deleted file mode 100644
index 7890975..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/ByteArrayCoderBenchmark.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * 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.microbenchmarks.coders;
-
-import java.io.IOException;
-import java.util.Arrays;
-import org.apache.beam.sdk.coders.ByteArrayCoder;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Param;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Warmup;
-
-/**
- * Benchmarks for {@link ByteArrayCoder}.
- */
-@State(Scope.Benchmark)
-@Fork(1)
-@Warmup(iterations = 5)
-public class ByteArrayCoderBenchmark {
-
-  ByteArrayCoder coder = ByteArrayCoder.of();
-
-  @Param({"true", "false"})
-  boolean isWholeStream;
-
-  byte[] shortArray;
-  byte[] longArray;
-
-  @Setup
-  public void setUp() {
-    shortArray = new byte[10];
-    Arrays.fill(shortArray, (byte) 47);
-    longArray = new byte[60 * 1024];
-    Arrays.fill(longArray, (byte) 47);
-  }
-
-  @Benchmark
-  public byte[] codeShortArray() throws IOException {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, shortArray);
-  }
-
-  @Benchmark
-  public byte[] codeLongArray() throws Exception {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, longArray);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/CoderBenchmarking.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/CoderBenchmarking.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/CoderBenchmarking.java
deleted file mode 100644
index c92215d..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/CoderBenchmarking.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.microbenchmarks.coders;
-
-import java.io.IOException;
-import org.apache.beam.sdk.coders.Coder;
-import org.apache.beam.sdk.util.CoderUtils;
-
-/**
- * Utilities for writing coder benchmarks.
- */
-class CoderBenchmarking {
-
-  /**
-   * Encodes and decodes the given value using the specified Coder.
-   *
-   * @throws IOException if there are errors during encoding or decoding
-   */
-  public static <T> T testCoder(
-      Coder<T> coder, boolean isWholeStream, T value) throws IOException {
-    Coder.Context context =
-        isWholeStream ? Coder.Context.OUTER : Coder.Context.NESTED;
-    byte[] encoded = CoderUtils.encodeToByteArray(coder, value, context);
-    return CoderUtils.decodeFromByteArray(coder, encoded, context);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/StringUtf8CoderBenchmark.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/StringUtf8CoderBenchmark.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/StringUtf8CoderBenchmark.java
deleted file mode 100644
index 540c958..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/StringUtf8CoderBenchmark.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.microbenchmarks.coders;
-
-import java.io.IOException;
-import java.util.Arrays;
-import org.apache.beam.sdk.coders.StringUtf8Coder;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Param;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Warmup;
-
-/**
- * Benchmarks for {@link StringUtf8Coder}.
- */
-@State(Scope.Benchmark)
-@Fork(1)
-@Warmup(iterations = 5)
-public class StringUtf8CoderBenchmark {
-
-  StringUtf8Coder coder = StringUtf8Coder.of();
-
-  @Param({"true", "false"})
-  boolean isWholeStream;
-
-  String shortString;
-  String longString;
-
-  @Setup
-  public void setUp() {
-    shortString = "hello world";
-
-    char[] bytes60k = new char[60 * 1024];
-    Arrays.fill(bytes60k, 'a');
-    longString = new String(bytes60k);
-  }
-
-  @Benchmark
-  public String codeEmptyString() throws IOException {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, "");
-  }
-
-  @Benchmark
-  public String codeShortString() throws IOException {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, shortString);
-  }
-
-  @Benchmark
-  public String codeLongString() throws IOException {
-    return CoderBenchmarking.testCoder(coder, isWholeStream, longString);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/package-info.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/package-info.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/package-info.java
deleted file mode 100644
index 0d735ee..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/coders/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * Benchmarks of various {@code Coder} implementations.
- */
-package org.apache.beam.sdk.microbenchmarks.coders;

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/DoFnInvokersBenchmark.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/DoFnInvokersBenchmark.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/DoFnInvokersBenchmark.java
deleted file mode 100644
index 442bdec..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/DoFnInvokersBenchmark.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * 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.microbenchmarks.transforms;
-
-import org.apache.beam.sdk.options.PipelineOptions;
-import org.apache.beam.sdk.transforms.Aggregator;
-import org.apache.beam.sdk.transforms.Combine.CombineFn;
-import org.apache.beam.sdk.transforms.DoFn;
-import org.apache.beam.sdk.transforms.DoFnAdapters;
-import org.apache.beam.sdk.transforms.OldDoFn;
-import org.apache.beam.sdk.transforms.reflect.DoFnInvoker;
-import org.apache.beam.sdk.transforms.reflect.DoFnInvoker.ArgumentProvider;
-import org.apache.beam.sdk.transforms.reflect.DoFnInvoker.FakeArgumentProvider;
-import org.apache.beam.sdk.transforms.reflect.DoFnInvokers;
-import org.apache.beam.sdk.transforms.windowing.BoundedWindow;
-import org.apache.beam.sdk.transforms.windowing.PaneInfo;
-import org.apache.beam.sdk.util.WindowingInternals;
-import org.apache.beam.sdk.values.PCollectionView;
-import org.apache.beam.sdk.values.TupleTag;
-import org.joda.time.Instant;
-import org.openjdk.jmh.annotations.Benchmark;
-import org.openjdk.jmh.annotations.Fork;
-import org.openjdk.jmh.annotations.Scope;
-import org.openjdk.jmh.annotations.Setup;
-import org.openjdk.jmh.annotations.State;
-import org.openjdk.jmh.annotations.Warmup;
-
-/**
- * Benchmarks for {@link OldDoFn} and {@link DoFn} invocations, specifically for measuring
the
- * overhead of {@link DoFnInvokers}.
- */
-@State(Scope.Benchmark)
-@Fork(1)
-@Warmup(iterations = 5)
-public class DoFnInvokersBenchmark {
-
-  private static final String ELEMENT = "some string to use for testing";
-
-  private OldDoFn<String, String> oldDoFn = new UpperCaseOldDoFn();
-  private DoFn<String, String> doFn = new UpperCaseDoFn();
-
-  private StubOldDoFnProcessContext stubOldDoFnContext =
-      new StubOldDoFnProcessContext(oldDoFn, ELEMENT);
-  private StubDoFnProcessContext stubDoFnContext = new StubDoFnProcessContext(doFn, ELEMENT);
-  private ArgumentProvider<String, String> argumentProvider =
-      new FakeArgumentProvider<>();
-
-  private OldDoFn<String, String> adaptedDoFnWithContext;
-
-  private DoFnInvoker<String, String> invoker;
-
-  @Setup
-  public void setUp() {
-    adaptedDoFnWithContext = DoFnAdapters.toOldDoFn(doFn);
-    invoker = DoFnInvokers.invokerFor(doFn);
-  }
-
-  @Benchmark
-  public String invokeOldDoFn() throws Exception {
-    oldDoFn.processElement(stubOldDoFnContext);
-    return stubDoFnContext.output;
-  }
-
-  @Benchmark
-  public String invokeDoFnWithContextViaAdaptor() throws Exception {
-    adaptedDoFnWithContext.processElement(stubOldDoFnContext);
-    return stubOldDoFnContext.output;
-  }
-
-  @Benchmark
-  public String invokeDoFnWithContext() throws Exception {
-    invoker.invokeProcessElement(argumentProvider);
-    return stubDoFnContext.output;
-  }
-
-  private static class UpperCaseOldDoFn extends OldDoFn<String, String> {
-
-    @Override
-    public void processElement(ProcessContext c) throws Exception {
-      c.output(c.element().toUpperCase());
-    }
-  }
-
-  private static class UpperCaseDoFn extends DoFn<String, String> {
-
-    @ProcessElement
-    public void processElement(ProcessContext c) throws Exception {
-      c.output(c.element().toUpperCase());
-    }
-  }
-
-  private static class StubOldDoFnProcessContext extends OldDoFn<String, String>.ProcessContext
{
-
-    private final String element;
-    private String output;
-
-    public StubOldDoFnProcessContext(OldDoFn<String, String> fn, String element) {
-      fn.super();
-      this.element = element;
-    }
-
-    @Override
-    public String element() {
-      return element;
-    }
-
-    @Override
-    public <T> T sideInput(PCollectionView<T> view) {
-      return null;
-    }
-
-    @Override
-    public Instant timestamp() {
-      return null;
-    }
-
-    @Override
-    public BoundedWindow window() {
-      return null;
-    }
-
-    @Override
-    public PaneInfo pane() {
-      return null;
-    }
-
-    @Override
-    public WindowingInternals<String, String> windowingInternals() {
-      return null;
-    }
-
-    @Override
-    public PipelineOptions getPipelineOptions() {
-      return null;
-    }
-
-    @Override
-    public void output(String output) {
-      this.output = output;
-    }
-
-    @Override
-    public void outputWithTimestamp(String output, Instant timestamp) {
-      output(output);
-    }
-
-    @Override
-    public <T> void sideOutput(TupleTag<T> tag, T output) {}
-
-    @Override
-    public <T> void sideOutputWithTimestamp(TupleTag<T> tag, T output, Instant
timestamp) {}
-
-    @Override
-    protected <AggInputT, AggOutputT> Aggregator<AggInputT, AggOutputT> createAggregatorInternal(
-        String name, CombineFn<AggInputT, ?, AggOutputT> combiner) {
-      return null;
-    }
-  }
-
-  private static class StubDoFnProcessContext extends DoFn<String, String>.ProcessContext
{
-    private final String element;
-    private String output;
-
-    public StubDoFnProcessContext(DoFn<String, String> fn, String element) {
-      fn.super();
-      this.element = element;
-    }
-
-    @Override
-    public String element() {
-      return element;
-    }
-
-    @Override
-    public <T> T sideInput(PCollectionView<T> view) {
-      return null;
-    }
-
-    @Override
-    public Instant timestamp() {
-      return null;
-    }
-
-    @Override
-    public PaneInfo pane() {
-      return null;
-    }
-
-    @Override
-    public PipelineOptions getPipelineOptions() {
-      return null;
-    }
-
-    @Override
-    public void output(String output) {
-      this.output = output;
-    }
-
-    @Override
-    public void outputWithTimestamp(String output, Instant timestamp) {
-      output(output);
-    }
-
-    @Override
-    public <T> void sideOutput(TupleTag<T> tag, T output) {}
-
-    @Override
-    public <T> void sideOutputWithTimestamp(TupleTag<T> tag, T output, Instant
timestamp) {}
-
-    @Override
-    protected <AggInputT, AggOutputT> Aggregator<AggInputT, AggOutputT> createAggregator(
-        String name,
-        CombineFn<AggInputT, ?, AggOutputT> combiner) {
-      return null;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/package-info.java
----------------------------------------------------------------------
diff --git a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/package-info.java
b/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/package-info.java
deleted file mode 100644
index b91e7b2..0000000
--- a/sdks/java/microbenchmarks/src/main/java/org/apache/beam/sdk/microbenchmarks/transforms/package-info.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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.
- */
-
-/**
- * Provides microbenchmarks of various transforms.
- */
-package org.apache.beam.sdk.microbenchmarks.transforms;

http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/1b520708/sdks/java/pom.xml
----------------------------------------------------------------------
diff --git a/sdks/java/pom.xml b/sdks/java/pom.xml
index fb07d25..0907c1a 100644
--- a/sdks/java/pom.xml
+++ b/sdks/java/pom.xml
@@ -40,7 +40,6 @@
     <module>io</module>
     <module>maven-archetypes</module>
     <module>extensions</module>
-    <module>microbenchmarks</module>
   </modules>
 
   <profiles>


Mime
View raw message