6061626364656667686970
e.printStackTrace(); } catch (InterruptedException e) { // ignore } try { memcachedClient.shutdown(); } catch (Exception e) { System.err.println("Shutdown MemcachedClient fail"); e.printStackTrace(); } }
4647484950515253545556
.println("Useage:java MemcachedStateListenerExample [servers]"); System.exit(1); } MemcachedClient memcachedClient = getMemcachedClient(args[0]); try { memcachedClient.shutdown(); } catch (IOException e) { e.printStackTrace(); } }
9293949596979899
cdl.await(); System.out.println("test cas,timed:" + (System.currentTimeMillis() - start)); // print result,must equals to NUM System.out.println("result=" + mc.get("a")); mc.shutdown(); } }
5657585960616263646566
126127128129130131132133134135136
barrier.await(); long secs = watch.getDurationInMillis() / 1000; int total = 4 * repeat * threads; long tps = total / secs; client.shutdown(); System.out.println("duration:" + secs + " seconds,tps:" + tps + " op/seconds,total:" + total + " ops"); } }
4748495051525354555657
for (int j = 0; j < BYTES.length; j++) { int repeats = getReapts(i); test(memcachedClient, BYTES[j], THREADS[i], repeats, true); } } memcachedClient.shutdown(); } private static void warmUp(MemcachedClient memcachedClient) throws Exception {
101102103104105106107108109110111
} } public void destroy() { super.destroy(); try { memcachedClient.shutdown(); } catch (Throwable e) { logger.warn(e.getMessage(), e); } } };