Skip to content

Commit

Permalink
Expanded the test cycle a bit for RexsterClient.
Browse files Browse the repository at this point in the history
  • Loading branch information
spmallette committed Nov 15, 2012
1 parent c1ab3e1 commit d8ec297
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Expand Up @@ -82,6 +82,15 @@ private void lotsOfCalls() {
counter++;
}

final int gRequestCount = random.nextInt(1000);
for (int ig = 1; ig < gRequestCount; ig++) {
final Map<String,Object> scriptArgs = new HashMap<String, Object>();
scriptArgs.put("id", random.nextInt(800));
final List<Map<String, Value>> innerResults = client.gremlin("g=rexster.getGraph('gratefulgraph');g.v(id).out('followed_by').loop(1){it.loops<3}[0..10]", scriptArgs, tMap(TString, TValue));
System.out.println(innerResults.size() > 0 ? innerResults.get(0) : "no results");
counter++;
}

final long end = System.currentTimeMillis() - checkpoint;
System.out.println((checkpoint - start) + ":" + end);
System.out.println(counter / (end / 1000));
Expand Down
Expand Up @@ -72,7 +72,6 @@ public NextAction handleRead(final FilterChainContext ctx) throws IOException {
msgPackScriptResponseMessage.setSessionAsUUID(RexProMessage.EMPTY_SESSION);
msgPackScriptResponseMessage.Request = specificMessage.Request;
msgPackScriptResponseMessage.Results = MsgPackScriptResponseMessage.convertResultToBytes(result);
logger.info(specificMessage.requestAsUUID());

ctx.write(msgPackScriptResponseMessage);

Expand Down

0 comments on commit d8ec297

Please sign in to comment.