You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/05/11 13:43:51 UTC
[20/50] [abbrv] incubator-tinkerpop git commit: Use an
executorservice in the profiling app to submit requests.
Use an executorservice in the profiling app to submit requests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/aa398ee1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/aa398ee1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/aa398ee1
Branch: refs/heads/TINKERPOP3-666
Commit: aa398ee1cccc847b5dd45a0bb79fc00c8977a7c9
Parents: 083afee
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 8 14:12:56 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 8 14:12:56 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/driver/util/ProfilingApplication.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/aa398ee1/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/util/ProfilingApplication.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/util/ProfilingApplication.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/util/ProfilingApplication.java
index d4d75be..fc2c6ef 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/util/ProfilingApplication.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/util/ProfilingApplication.java
@@ -31,6 +31,8 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -48,6 +50,8 @@ public class ProfilingApplication {
private final int clients;
private final String executionName;
+ private static final ExecutorService executor = Executors.newFixedThreadPool(8);
+
public ProfilingApplication(final String executionName, final Cluster cluster, final int clients, final int requests) {
this.executionName = executionName;
this.cluster = cluster;
@@ -83,7 +87,7 @@ public class ProfilingApplication {
} finally {
latch.countDown();
}
- })
+ }, executor)
);
// finish once all requests are accounted for