some cleanup of Stopwatch APIs

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@2303 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2008-01-07 17:18:47 +00:00
parent 2beef22848
commit 2e6a0f6606
4 changed files with 13 additions and 13 deletions

View File

@ -10,7 +10,7 @@
*******************************************************************************/
package com.ibm.wala.client;
import com.ibm.wala.util.Stopwatch;
import com.ibm.wala.util.perf.StopwatchGC;
/**
*
@ -30,12 +30,12 @@ public abstract class AbstractEngineStopwatch implements EngineStopwatch {
*/
protected abstract String[] getCategoryNames();
protected final Stopwatch[] stopwatch;
protected final StopwatchGC[] stopwatch;
protected AbstractEngineStopwatch() {
stopwatch = new Stopwatch[getNumberOfCategories()];
stopwatch = new StopwatchGC[getNumberOfCategories()];
for (int i = 0; i < getNumberOfCategories(); i++) {
stopwatch[i] = new Stopwatch(getCategoryNames()[i]);
stopwatch[i] = new StopwatchGC(getCategoryNames()[i]);
}
}
@ -64,7 +64,7 @@ public abstract class AbstractEngineStopwatch implements EngineStopwatch {
stopwatch[category].stop();
}
public Stopwatch getTimer(byte category) {
public StopwatchGC getTimer(byte category) {
return stopwatch[category];
}

View File

@ -10,7 +10,7 @@
*******************************************************************************/
package com.ibm.wala.client;
import com.ibm.wala.util.Stopwatch;
import com.ibm.wala.util.perf.StopwatchGC;
/**
@ -39,5 +39,5 @@ public interface EngineStopwatch {
/**
* Returns access to class encapsulating time events results, related to the given category.
*/
public Stopwatch getTimer(byte category);
public StopwatchGC getTimer(byte category);
}

View File

@ -11,7 +11,6 @@
package com.ibm.wala.util.perf;
/**
*
* Basic class to time events
*
* @author sfink

View File

@ -8,16 +8,17 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.wala.util;
package com.ibm.wala.util.perf;
/**
*
* Basic class to time events. The resolution is one millisecond.
* A {@link Stopwatch} that also queries the free memory from the GC.
* This is mostly useless.
*
* @author sfink
* @author dgrove
*/
public class Stopwatch extends com.ibm.wala.util.perf.Stopwatch {
public class StopwatchGC extends com.ibm.wala.util.perf.Stopwatch {
final private String name;
@ -25,7 +26,7 @@ public class Stopwatch extends com.ibm.wala.util.perf.Stopwatch {
private long endMemory;
public Stopwatch(String name) {
public StopwatchGC(String name) {
super();
this.name = name;
}