use the GraphProvider to convert hardcoded ids
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/3a78fdb6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/3a78fdb6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/3a78fdb6
Branch: refs/heads/TINKERPOP3-982
Commit: 3a78fdb6300a47936d59c4897b19f5aa3f296e9b
Parents: b0e1f66
Author: pieter <pieter.martin@gmail.com>
Authored: Mon Nov 30 22:00:15 2015 +0200
Committer: pieter <pieter.martin@gmail.com>
Committed: Mon Nov 30 22:00:15 2015 +0200
----------------------------------------------------------------------
.../groovy/loaders/SugarLoaderPerformanceTest.groovy | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3a78fdb6/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
index 50496d6..021ba41 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/groovy/loaders/SugarLoaderPerformanceTest.groovy
@@ -26,6 +26,7 @@ import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart
import com.carrotsearch.junitbenchmarks.annotation.LabelType
import org.apache.tinkerpop.gremlin.AbstractGremlinTest
import org.apache.tinkerpop.gremlin.LoadGraphWith
+import org.apache.tinkerpop.gremlin.structure.Vertex
import org.junit.FixMethodOrder
import org.junit.Rule
import org.junit.Test
@@ -110,27 +111,27 @@ class SugarLoaderPerformanceTest extends AbstractGremlinTest {
@LoadGraphWith(LoadGraphWith.GraphData.MODERN)
@Test
public void java_g_VX1X_name() throws Exception {
- g.V(1).values("name").iterate()
+ g.V(graphProvider.convertId(1, Vertex.class)).values("name").iterate()
}
@BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS,
warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.MODERN)
@Test
public void groovy_g_VX1X_name() throws Exception {
- g.V(1).name.iterate()
+ g.V(graphProvider.convertId(1, Vertex.class)).name.iterate()
}
@BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS,
warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.MODERN)
@Test
public void java_g_VX1X_outE() throws Exception {
- g.V(1).outE().iterate()
+ g.V(graphProvider.convertId(1, Vertex.class)).outE().iterate()
}
@BenchmarkOptions(benchmarkRounds = SugarLoaderPerformanceTest.DEFAULT_BENCHMARK_ROUNDS,
warmupRounds = SugarLoaderPerformanceTest.DEFAULT_WARMUP_ROUNDS, concurrency = BenchmarkOptions.CONCURRENCY_SEQUENTIAL)
@LoadGraphWith(LoadGraphWith.GraphData.MODERN)
@Test
public void groovy_g_VX1X_outE() throws Exception {
- g.V(1).outE.iterate()
+ g.V(graphProvider.convertId(1, Vertex.class)).outE.iterate()
}
}
|