[Swift-commit] r2774 - trunk/src/org/griphyn/vdl/karajan/lib
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Mar 30 00:25:50 CDT 2009
Author: benc
Date: 2009-03-30 00:25:50 -0500 (Mon, 30 Mar 2009)
New Revision: 2774
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
the joy of whitespace
Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2009-03-30 05:24:57 UTC (rev 2773)
+++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java 2009-03-30 05:25:50 UTC (rev 2774)
@@ -19,10 +19,10 @@
proof of concept. */
public class RuntimeStats extends FunctionsCollection {
-
- public static final String TICKER = "#swift-runtime-progress-ticker";
- public static final String PROGRESS = "#swift-runtime-progress";
+ public static final String TICKER = "#swift-runtime-progress-ticker";
+ public static final String PROGRESS = "#swift-runtime-progress";
+
public static final Arg PA_STATE = new Arg.Positional("state");
public static final int MIN_PERIOD_MS=1000;
public static final int MAX_PERIOD_MS=30000;
@@ -53,17 +53,17 @@
}
public static ProgressTicker getTicker(VariableStack stack) {
- return (ProgressTicker) stack.getGlobal(TICKER);
- }
+ return (ProgressTicker) stack.getGlobal(TICKER);
+ }
public static void setProgress(VariableStack stack, RuntimeProgress p) {
- stack.parentFrame().setVar(PROGRESS, p);
- }
-
- public static RuntimeProgress getProgress(VariableStack stack) throws VariableNotFoundException {
- return (RuntimeProgress) stack.getDeepVar(PROGRESS);
- }
+ stack.parentFrame().setVar(PROGRESS, p);
+ }
+ public static RuntimeProgress getProgress(VariableStack stack) throws VariableNotFoundException {
+ return (RuntimeProgress) stack.getDeepVar(PROGRESS);
+ }
+
public Object vdl_startprogressticker(VariableStack stack) throws ExecutionException {
ProgressTicker t = new ProgressTicker();
t.setDaemon(true);
@@ -160,24 +160,24 @@
}
public Map getSummary() {
- Map summary = new HashMap();
- synchronized(states) {
- Iterator stateIterator = states.iterator();
+ Map summary = new HashMap();
+ synchronized(states) {
+ Iterator stateIterator = states.iterator();
- // summarize details of known states into summary, with
- // one entry per state type, storing the number of
- // jobs in that state.
- while(stateIterator.hasNext()) {
- String key = ((RuntimeProgress)stateIterator.next()).status;
- Integer count = (Integer) summary.get(key);
- if(count == null) {
- summary.put(key,new Integer(1));
- } else {
- summary.put(key,new Integer(count.intValue()+1));
- }
- }
- }
- return summary;
+ // summarize details of known states into summary, with
+ // one entry per state type, storing the number of
+ // jobs in that state.
+ while(stateIterator.hasNext()) {
+ String key = ((RuntimeProgress)stateIterator.next()).status;
+ Integer count = (Integer) summary.get(key);
+ if(count == null) {
+ summary.put(key,new Integer(1));
+ } else {
+ summary.put(key,new Integer(count.intValue()+1));
+ }
+ }
+ }
+ return summary;
}
void printStates(String header) {
More information about the Swift-commit
mailing list