You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/05/07 20:22:08 UTC
[08/10] incubator-tinkerpop git commit: Move pause in profiler to end
of a cycle rather than at the beginning.
Move pause in profiler to end of a cycle rather than at the beginning.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/359bfaf6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/359bfaf6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/359bfaf6
Branch: refs/heads/master
Commit: 359bfaf695858d9d88ff5e8b3a8e130dd9ebef39
Parents: dbeacfe
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu May 7 14:02:32 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu May 7 14:02:32 2015 -0400
----------------------------------------------------------------------
.../tinkerpop/gremlin/driver/util/ProfilingApplication.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/359bfaf6/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 10f77ed..5001aff 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
@@ -165,8 +165,8 @@ public class ProfilingApplication {
System.out.println("---------------------------WARMUP CYCLE---------------------------");
for (int ix = 0; ix < warmups; ix++) {
- TimeUnit.SECONDS.sleep(1); // pause between executions
new ProfilingApplication("warmup-" + (ix + 1), cluster, clients, requests).execute();
+ TimeUnit.SECONDS.sleep(1); // pause between executions
}
final AtomicBoolean exceededTimeout = new AtomicBoolean(false);
@@ -174,9 +174,9 @@ public class ProfilingApplication {
System.out.println("----------------------------TEST CYCLE----------------------------");
long totalRequestsPerSecond = 0;
for (int ix = 0; ix < executions && !exceededTimeout.get(); ix++) {
- TimeUnit.SECONDS.sleep(1); // pause between executions
totalRequestsPerSecond += new ProfilingApplication("test-" + (ix + 1), cluster, clients, requests).execute();
exceededTimeout.set((System.nanoTime() - start) > TimeUnit.NANOSECONDS.convert(timeout, TimeUnit.MILLISECONDS));
+ TimeUnit.SECONDS.sleep(1); // pause between executions
}
final int averageRequestPerSecond = exceededTimeout.get() ? 0 : Math.round(totalRequestsPerSecond / executions);