ruper2/src/java/core/org/krysalis/ruper2/tool Tool.java,1.4,1.5

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/tool
In directory sc8-pr-cvs1:/tmp/cvs-serv16855/src/java/core/org/krysalis/ruper2/tool

Modified Files:
	Tool.java 
Log Message:
1) Monitoring (so we can sniff out failures in testing, to improve)
2) First step in removing VFS...

Index: Tool.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper2/tool/Tool.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Tool.java	9 Oct 2003 16:02:19 -0000	1.4
--- Tool.java	9 Oct 2003 20:30:26 -0000	1.5
***************
*** 10,13 ****
--- 10,15 ----
  import org.krysalis.ruper2.log.Logger;
  import org.krysalis.ruper2.log.StandardLogListener;
+ import org.krysalis.ruper2.monitor.Monitor;
+ import org.krysalis.ruper2.monitor.StatisticsMonitor;
  import org.krysalis.version.util.SystemUtils;
  import org.krysalis.version.util.cli.CommandLine;
***************
*** 25,28 ****
--- 27,31 ----
  	private static Option l_debugOption = null;
  	private static Option l_verboseOption = null;
+ 	private static Option l_statsOption = null;
  	private static Option l_helpOption = null;
  	private static Options l_options = null;
***************
*** 32,35 ****
--- 35,40 ----
  	private static boolean l_help = false;
  
+ 	private static StatisticsMonitor l_statistics = null;
+ 
  	static {
  		l_helpOption = new Option("h", "help", false, "print help");
***************
*** 37,44 ****
--- 42,52 ----
  		l_verboseOption = new Option("v", "verbose", false, "verbose output");
  
+ 		l_statsOption = new Option("s", "stats", false, "statistics output");
+ 
  		l_options = new Options();
  		l_options.addOption(l_helpOption);
  		l_options.addOption(l_debugOption);
  		l_options.addOption(l_verboseOption);
+ 		l_options.addOption(l_statsOption);
  	}
  
***************
*** 83,91 ****
  
  		//:TODO:Hack
! 		DebugUtils.enableCommonsLogging();
  		//DebugUtils.enableHttpClientDebug();
! 		
  		RuperConfig.configure();
! 		
  		init();
  
--- 91,99 ----
  
  		//:TODO:Hack
! 		//DebugUtils.enableCommonsLogging();
  		//DebugUtils.enableHttpClientDebug();
! 
  		RuperConfig.configure();
! 
  		init();
  
***************
*** 101,106 ****
  		if (l_verbose || l_debug)
  			level = l_debug ? LogConstant.DEBUG : LogConstant.VERBOSE;
! 		Logger logger =
! 			logger = Logger.pushContext(level,new StandardLogListener());
  
  		try {
--- 109,117 ----
  		if (l_verbose || l_debug)
  			level = l_debug ? LogConstant.DEBUG : LogConstant.VERBOSE;
! 		Logger logger = Logger.pushContext(level, new StandardLogListener());
! 
! 		// Monitor (and store statistics)
! 		l_statistics = new StatisticsMonitor();
! 		Monitor monitor = Monitor.pushContext(l_statistics);
  
  		try {
***************
*** 118,122 ****
  		}
  		finally {
! 			Logger.popContext(logger);
  		}
  	}
--- 129,138 ----
  		}
  		finally {
! 			Monitor.popContext(monitor);
! 			Logger.popContext(logger);			
! 
! 			if (cmdline.isSet(l_statsOption)) {
! 				DebugUtils.dump(l_statistics);
! 			}
  		}
  	}




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.