/** * Kicks off the benchmark on all cluster nodes */ void startBenchmark() throws Throwable { RequestOptions options=new RequestOptions(ResponseMode.GET_ALL,0); options.setFlags(Message.Flag.OOB,Message.Flag.DONT_BUNDLE); RspList<Object> responses=disp.callRemoteMethods(null,new MethodCall(START),options); long total_reqs=0; long total_time=0; System.out.println("\n======================= Results: ==========================="); for(Map.Entry<Address,Rsp<Object>> entry : responses.entrySet()) { Address mbr=entry.getKey(); Rsp rsp=entry.getValue(); Results result=(Results)rsp.getValue(); total_reqs+=result.num_msgs; total_time+=result.time; System.out.println(mbr + ": " + result); } double total_reqs_sec=total_reqs / (total_time / 1000.0); double throughput=total_reqs_sec * msg_size; double ms_per_req=total_time / (double)total_reqs; Protocol prot=channel.getProtocolStack().findProtocol(Util.getUnicastProtocols()); System.out.println("\n"); System.out.println(Util.bold("Average of " + f.format(total_reqs_sec) + " requests / sec (" + Util.printBytes(throughput) + " / sec), " + f.format(ms_per_req) + " ms /request (prot=" + prot.getName() + ")")); System.out.println("\n\n"); }
/** * Kicks off the benchmark on all cluster nodes */ void startBenchmark() throws Throwable { RequestOptions options=new RequestOptions(ResponseMode.GET_ALL,0); options.setFlags(Message.Flag.OOB,Message.Flag.DONT_BUNDLE); RspList<Object> responses=disp.callRemoteMethods(null,new MethodCall(START),options); long total_reqs=0; long total_time=0; System.out.println("\n======================= Results: ==========================="); for(Map.Entry<Address,Rsp<Object>> entry : responses.entrySet()) { Address mbr=entry.getKey(); Rsp rsp=entry.getValue(); Results result=(Results)rsp.getValue(); total_reqs+=result.num_msgs; total_time+=result.time; System.out.println(mbr + ": " + result); } double total_reqs_sec=total_reqs / (total_time / 1000.0); double throughput=total_reqs_sec * msg_size; double ms_per_req=total_time / (double)total_reqs; Protocol prot=channel.getProtocolStack().findProtocol(Util.getUnicastProtocols()); System.out.println("\n"); System.out.println(Util.bold("Average of " + f.format(total_reqs_sec) + " requests / sec (" + Util.printBytes(throughput) + " / sec), " + f.format(ms_per_req) + " ms /request (prot=" + prot.getName() + ")")); System.out.println("\n\n"); }
/** * Kicks off the benchmark on all cluster nodes */ void startBenchmark() throws Throwable { RequestOptions options=new RequestOptions(ResponseMode.GET_ALL,0); options.setFlags(Message.Flag.OOB,Message.Flag.DONT_BUNDLE); RspList<Object> responses=disp.callRemoteMethods(null,new MethodCall(START),options); long total_reqs=0; long total_time=0; System.out.println("\n======================= Results: ==========================="); for(Map.Entry<Address,Rsp<Object>> entry : responses.entrySet()) { Address mbr=entry.getKey(); Rsp rsp=entry.getValue(); Results result=(Results)rsp.getValue(); total_reqs+=result.num_msgs; total_time+=result.time; System.out.println(mbr + ": " + result); } double total_reqs_sec=total_reqs / (total_time / 1000.0); double throughput=total_reqs_sec * msg_size; double ms_per_req=total_time / (double)total_reqs; Protocol prot=channel.getProtocolStack().findProtocol(Util.getUnicastProtocols()); System.out.println("\n"); System.out.println(Util.bold("Average of " + f.format(total_reqs_sec) + " requests / sec (" + Util.printBytes(throughput) + " / sec), " + f.format(ms_per_req) + " ms /request (prot=" + prot.getName() + ")")); System.out.println("\n\n"); }
double throughput=total_reqs_sec * BUFFER.length; System.out.println("\n"); System.out.println(Util.bold(String.format("Throughput: %.2f reqs/sec/node (%s/sec)\n" + "Roundtrip: gets %s, puts %s\n", total_reqs_sec, Util.printBytes(throughput),
double throughput=total_reqs_sec * BUFFER.length; System.out.println("\n"); System.out.println(Util.bold(String.format("Throughput: %.2f reqs/sec/node (%s/sec)\n" + "Roundtrip: gets %s, puts %s\n", total_reqs_sec, Util.printBytes(throughput),
double throughput=total_reqs_sec * BUFFER.length; System.out.println("\n"); System.out.println(Util.bold(String.format("Throughput: %.2f reqs/sec/node (%s/sec)\n" + "Roundtrip: gets %s, puts %s\n", total_reqs_sec, Util.printBytes(throughput),
double reqs_sec=num_msgs / (time / 1000.0); double throughput=num_msgs * msg_size / (time / 1000.0); System.out.println(Util.bold("\ninvoked " + num_msgs + " requests in " + time + " ms: " + time_per_req + " ms/req, " + String.format("%.2f", reqs_sec) + " reqs/sec, " + Util.printBytes(throughput) + "/sec\n"));
double reqs_sec=num_msgs / (time / 1000.0); double throughput=num_msgs * msg_size / (time / 1000.0); System.out.println(Util.bold("\ninvoked " + num_msgs + " requests in " + time + " ms: " + time_per_req + " ms/req, " + String.format("%.2f", reqs_sec) + " reqs/sec, " + Util.printBytes(throughput) + "/sec\n"));
double reqs_sec=num_msgs / (time / 1000.0); double throughput=num_msgs * msg_size / (time / 1000.0); System.out.println(Util.bold("\ninvoked " + num_msgs + " requests in " + time + " ms: " + time_per_req + " ms/req, " + String.format("%.2f", reqs_sec) + " reqs/sec, " + Util.printBytes(throughput) + "/sec\n"));
System.out.printf(Util.bold("req-latency = min/avg/max: %d / %.2f / %d %s\n"), req_latency.min(), req_latency.average(), req_latency.max(), unit()); req_latency.clear();
System.out.printf(Util.bold("req-latency = min/avg/max: %d / %.2f / %d %s\n"), req_latency.min(), req_latency.average(), req_latency.max(), unit()); req_latency.clear();
System.out.printf(Util.bold("req-latency = min/avg/max: %d / %.2f / %d %s\n"), req_latency.min(), req_latency.average(), req_latency.max(), unit()); req_latency.clear();