[05/34] tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-14 Thread florianhockmann
TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/TINKERPOP-1897
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public class JavaTranslatorBenchmark extends AbstractBenchmarkBase {
+
+private final Graph 

[26/50] tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-14 Thread florianhockmann
TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/TINKERPOP-1854
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public class JavaTranslatorBenchmark extends AbstractBenchmarkBase {
+
+private final Graph 

[05/31] tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-13 Thread dkuppitz
TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/TRAVIS-TEST
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public class JavaTranslatorBenchmark extends AbstractBenchmarkBase {
+
+private final Graph 

[1/2] tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-12 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 f80a54277 -> d3be13b4c


TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/tp32
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public class 

[1/4] tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-12 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/master c6c3f0f02 -> bf58b63ea


TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/master
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public class 

[1/3] tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-12 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 7f06a18ea -> 097ad015e


TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/tp33
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public class 

tinkerpop git commit: TINKERPOP-1911 Refactored JavaTranslator

2018-03-06 Thread spmallette
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1911 [created] d9db27f4a


TINKERPOP-1911 Refactored JavaTranslator

Cached methods that were being reflected on every translation which improved 
performance a bit.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/d9db27f4
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/d9db27f4
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/d9db27f4

Branch: refs/heads/TINKERPOP-1911
Commit: d9db27f4aa7b8227a557cf5bbb31203612d7548f
Parents: 2c6c151
Author: Stephen Mallette 
Authored: Tue Mar 6 13:00:30 2018 -0500
Committer: Stephen Mallette 
Committed: Tue Mar 6 13:00:30 2018 -0500

--
 CHANGELOG.asciidoc  |  1 +
 .../jsr223/JavaTranslatorBenchmark.java | 76 
 .../gremlin/jsr223/JavaTranslator.java  | 58 ---
 3 files changed, 125 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/CHANGELOG.asciidoc
--
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index b9f22e1..54e5347 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ 
image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 * Modified `GremlinDslProcessor` so that it generated the 
`getAnonymousTraversalClass()` method to return the DSL version of `__`.
 * Added the "Kitchen Sink" test data set.
 * Fixed deserialization of `P.not()` for GraphSON.
+* Improved performance of `JavaTranslator` by caching reflected methods 
required for traversal construction.
 * Added `idleConnectionTimeout` and `keepAliveInterval` to Gremlin Server that 
enables a "ping" and auto-close for seemingly dead clients.
 * Fixed a bug in `NumberHelper` that led to wrong min/max results if numbers 
exceeded the Integer limits.
 * Delayed setting of the request identifier until `RequestMessage` 
construction by the builder.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d9db27f4/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
--
diff --git 
a/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
new file mode 100644
index 000..d33b574
--- /dev/null
+++ 
b/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/JavaTranslatorBenchmark.java
@@ -0,0 +1,76 @@
+/*
+ * 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.tinkerpop.jsr223;
+
+import org.apache.tinkerpop.benchmark.util.AbstractBenchmarkBase;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.P;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategy;
+import 
org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.util.empty.EmptyGraph;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.State;
+
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.as;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.hasLabel;
+import static org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.inE;
+import static 
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.values;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@State(Scope.Thread)
+public