MCPcopy Create free account
hub / github.com/dgraph-io/dgraph4j / runTotal

Method runTotal

src/test/java/io/dgraph/BankTest.java:50–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48 }
49
50 private void runTotal() {
51 String query =
52 " {\n"
53 + " var(func: uid(%s)) {\n"
54 + " b as bal\n"
55 + " }\n"
56 + " total() {\n"
57 + " bal: sum(val(b))\n"
58 + " }\n"
59 + " }";
60 query = String.format(query, String.join(",", uids));
61 Transaction txn = dgraphClient.newTransaction();
62 Response resp = txn.query(query);
63 logger.debug("\nresponse json: {}\n", resp.getJson().toStringUtf8());
64 logger.debug("Runs: {}. Aborts: {}\n", runs.get(), aborts.get());
65 }
66
67 private void runTotalInLoop() {
68 while (true) {

Callers 1

runTotalInLoopMethod · 0.95

Calls 2

queryMethod · 0.95
newTransactionMethod · 0.45

Tested by

no test coverage detected