[Swift-commit] r7311 - trunk/src/org/griphyn/vdl/karajan
hategan at ci.uchicago.edu
hategan at ci.uchicago.edu
Fri Nov 22 22:13:01 CST 2013
Author: hategan
Date: 2013-11-22 22:13:01 -0600 (Fri, 22 Nov 2013)
New Revision: 7311
Modified:
trunk/src/org/griphyn/vdl/karajan/Loader.java
Log:
added a "pause on start" command line options, mostly useful for attaching profilers/debuggers and getting enough time to set them up
Modified: trunk/src/org/griphyn/vdl/karajan/Loader.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/Loader.java 2013-11-23 04:03:07 UTC (rev 7310)
+++ trunk/src/org/griphyn/vdl/karajan/Loader.java 2013-11-23 04:13:01 UTC (rev 7311)
@@ -88,6 +88,7 @@
public static final String ARG_RECOMPILE = "recompile";
public static final String ARG_REDUCED_LOGGING = "reduced.logging";
public static final String ARG_MINIMAL_LOGGING = "minimal.logging";
+ public static final String ARG_PAUSE_ON_START = "pause.on.start";
public static final String CONST_VDL_OPERATION = "vdl:operation";
public static final String VDL_OPERATION_RUN = "run";
@@ -160,6 +161,7 @@
logger.info("RUN_START");
new HangChecker(context).start();
+
long start = System.currentTimeMillis();
ec.start(context);
ec.waitFor();
@@ -232,8 +234,12 @@
System.out.println(loadVersion());
error("No Swift script specified");
}
+ if (ap.isPresent(ARG_PAUSE_ON_START)) {
+ System.out.println("Press enter to continue...");
+ System.in.read();
+ }
}
- catch (ArgumentParserException e) {
+ catch (Exception e) {
System.err.println("Error parsing arguments: " + e.getMessage()
+ "\n");
shortUsage();
@@ -547,6 +553,8 @@
"information and low-level task messages");
ap.addFlag(ARG_MINIMAL_LOGGING, "Makes logging much more terse: " +
"reports warnings only");
+ ap.addFlag(ARG_PAUSE_ON_START, "Pauses execution on start. Useful for " +
+ "attaching a debugger or profiler to the swift process");
Map<String, PropInfo> desc = VDL2ConfigProperties.getPropertyDescriptions();
More information about the Swift-commit
mailing list