// Path: leotask/src/core/org/leores/util/able/Processable0.java
// public interface Processable0<R> {
// 	public R process();
// }


import org.leores.util.able.Processable0;

package org.leores.util;


public class TestUtil extends LogUtil {
	public static double[] compareRunTime(int nRept, int nComp, Runnable... runs) {
		double[] rtn = new double[runs.length];
		Timer timer = new Timer();
		tLog("TestUtil.compareRunTime : ", U.toStr(runs));
		for (int i = 0; i < nComp; i++) {
			tLog("----- " + i + " -----");
			for (int k = 0; k < runs.length; k++) {
				long tTotal = 0;
				for (int j = 0; j < nRept; j++) {
					timer.start();
					runs[k].run();
					tTotal += timer.stop();
				}
				double tAverage = (double) tTotal / nRept;
				rtn[k] = tAverage;
				tLog("r" + k + " [average, total]ms : ", tAverage, tTotal);
			}
		}
		tLog("----- End -----");
		return rtn;
	}


// Path: leotask/src/core/org/leores/util/able/Processable0.java
// public interface Processable0<R> {
// 	public R process();
// }


// Path: leotask/src/core/org/leores/util/TestUtil.java
import org.leores.util.able.Processable0;

package org.leores.util;


public class TestUtil extends LogUtil {
	public static double[] compareRunTime(int nRept, int nComp, Runnable... runs) {
		double[] rtn = new double[runs.length];
		Timer timer = new Timer();
		tLog("TestUtil.compareRunTime : ", U.toStr(runs));
		for (int i = 0; i < nComp; i++) {
			tLog("----- " + i + " -----");
			for (int k = 0; k < runs.length; k++) {
				long tTotal = 0;
				for (int j = 0; j < nRept; j++) {
					timer.start();
					runs[k].run();
					tTotal += timer.stop();
				}
				double tAverage = (double) tTotal / nRept;
				rtn[k] = tAverage;
				tLog("r" + k + " [average, total]ms : ", tAverage, tTotal);
			}
		}
		tLog("----- End -----");
		return rtn;
	}


	public static double[] compareRunTime(int nRept, int nComp, Processable0<Double>... pros) {
