public Stopwatch() { start(); }
public String getTimeString() { long totalTime = getTime(); String totalTimeStr = totalTime < 10000 ? totalTime + " ms" : (double) totalTime / 1000.0 + " s"; return totalTimeStr; } }
public long getTime() { updateTotalTime(); return totalTime; }
@BeforeClass public static void setUpBeforeClass() throws Exception { Stopwatch sw = new Stopwatch(); sw.start(); loadDataAccesses(); sw.stop(); System.out.println("Set up time: " + sw.getTimeString()); }
pgIndex.insert(circleGrid); Stopwatch sw = new Stopwatch(); int inCount = runIndexedQuery(pgIndex); String indexTime = sw.getTimeString(); Stopwatch sw2 = new Stopwatch(); int inCount2 = runBruteForceQuery(circleGrid); String bruteForceTime = sw2.getTimeString();
public String getTimeString() { long totalTime = getTime(); return getTimeString(totalTime); }
@BeforeClass public static void setUpBeforeClass() throws Exception { Stopwatch sw = new Stopwatch(); sw.start(); loadDataAccesses(); sw.stop(); System.out.println("Set up time: " + sw.getTimeString()); }
pgIndex.insert(circleGrid); Stopwatch sw = new Stopwatch(); int inCount = runIndexedQuery(pgIndex); String indexTime = sw.getTimeString(); Stopwatch sw2 = new Stopwatch(); int inCount2 = runBruteForceQuery(circleGrid); String bruteForceTime = sw2.getTimeString();
public static void printTime(String tag) { if (!debugOn) { return; } long time = stopwatch.getTime(); long elapsedTime = time - lastTimePrinted; debug.instancePrint( formatField(Stopwatch.getTimeString(time), 10) + " (" + formatField(Stopwatch.getTimeString(elapsedTime), 10) + " ) " + tag); debug.println(); lastTimePrinted = time; }
public long stop() { if (isRunning) { updateTotalTime(); isRunning = false; } return totalTime; }
public Stopwatch() { start(); }
public long split() { if (isRunning) updateTotalTime(); return totalTime; }
public long split() { if (isRunning) updateTotalTime(); return totalTime; }
public long stop() { if (isRunning) { updateTotalTime(); isRunning = false; } return totalTime; }
public long getTime() { updateTotalTime(); return totalTime; }