package org.jgroups.tests; import org.jgroups.logging.Log; import org.jgroups.logging.LogFactory; public class bla5 { protected static final Log log=LogFactory.getLog(bla5.class); public static void main(String[] args) throws Exception { if(args.length != 2) { System.out.println("bla5 "); return; } final int NUM=Integer.valueOf(args[0]); final boolean NEW=Boolean.valueOf(args[1]); final String addr="number"; long start=System.currentTimeMillis(); for(int i=0; i < NUM; i++) { if(NEW) { // if(log.isTraceEnabled()) log.trace("the value is %s - %d", addr, i); // log.trace("static string"); // fast } else { if(log.isTraceEnabled()) log.trace("the value is " + addr + " - " + i); } } long diff=System.currentTimeMillis() - start; long rate=(long)(NUM / (diff / 1000.0)); System.out.println((NEW? "NEW" : "OLD") + ": time=" + diff + " ms, rate=" + rate + " statement/sec"); } }