User: user57
Date: 02/02/14 22:15:53
Modified: src/main/org/jboss/test/jbossmx/performance/standard
InvocationTestCase.java
Log:
o replaced most System.out usage with Log4j. should really introduce
some base classes to make this mess more maintainable...
Revision Changes Path
1.2 +18 -16
jbosstest/src/main/org/jboss/test/jbossmx/performance/standard/InvocationTestCase.java
Index: InvocationTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jbossmx/performance/standard/InvocationTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvocationTestCase.java 2 Feb 2002 03:16:25 -0000 1.1
+++ InvocationTestCase.java 15 Feb 2002 06:15:53 -0000 1.2
@@ -17,6 +17,8 @@
extends TestCase
{
+ org.apache.log4j.Category log =
org.apache.log4j.Category.getInstance(getClass());
+
public InvocationTestCase(String s)
{
super(s);
@@ -26,9 +28,9 @@
{
try
{
- System.out.println("\nSTANDARD: void invocation with DefaultDomain");
- System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" +
REPEAT_COUNT);
- System.out.println("(this may take a while...)\n");
+ log.debug("\nSTANDARD: void invocation with DefaultDomain");
+ log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
+ log.debug("(this may take a while...)\n");
MBeanServer server = MBeanServerFactory.createMBeanServer();
ObjectName name = new ObjectName(":performanceTest=standard");
@@ -56,7 +58,7 @@
}
}
- System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
+ log.debug("\nAverage: " + (avg/REPEAT_COUNT));
}
catch (Throwable t)
{
@@ -69,9 +71,9 @@
{
try
{
- System.out.println("\nSTANDARD: void invocation");
- System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" +
REPEAT_COUNT);
- System.out.println("(this may take a while...)\n");
+ log.debug("\nSTANDARD: void invocation");
+ log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
+ log.debug("(this may take a while...)\n");
MBeanServer server = MBeanServerFactory.createMBeanServer();
ObjectName name = new ObjectName("Domain:performanceTest=standard");
@@ -99,7 +101,7 @@
}
}
- System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
+ log.debug("\nAverage: " + (avg/REPEAT_COUNT));
}
catch (Throwable t)
{
@@ -112,9 +114,9 @@
{
try
{
- System.out.println("\nSTANDARD: counter invocation");
- System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" +
REPEAT_COUNT);
- System.out.println("(this may take a while...)\n");
+ log.debug("\nSTANDARD: counter invocation");
+ log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
+ log.debug("(this may take a while...)\n");
MBeanServer server = MBeanServerFactory.createMBeanServer();
ObjectName name = new ObjectName("Domain:performanceTest=standard");
@@ -143,7 +145,7 @@
}
}
- System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
+ log.debug("\nAverage: " + (avg/REPEAT_COUNT));
assertTrue(mbean.getCount() == (REPEAT_COUNT + 1)*ITERATION_COUNT);
}
@@ -159,9 +161,9 @@
{
try
{
- System.out.println("\nSTANDARD: mixed arguments invocation");
- System.out.println(ITERATION_COUNT + " Invocations, Repeat: x" +
REPEAT_COUNT);
- System.out.println("(this may take a while...)\n");
+ log.debug("\nSTANDARD: mixed arguments invocation");
+ log.debug(ITERATION_COUNT + " Invocations, Repeat: x" + REPEAT_COUNT);
+ log.debug("(this may take a while...)\n");
MBeanServer server = MBeanServerFactory.createMBeanServer();
ObjectName name = new ObjectName("Domain:performanceTest=standard");
@@ -223,7 +225,7 @@
}
}
- System.out.println("\nAverage: " + (avg/REPEAT_COUNT));
+ log.debug("\nAverage: " + (avg/REPEAT_COUNT));
}
catch (Throwable t)
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development