[jboss-svn-commits] JBL Code SVN: r29662 - in labs/jbosstm/workspace/whitingjr/trunk/performance/src: test/java/org/jboss/tm/performance and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Oct 19 09:45:27 EDT 2009
Author: whitingjr
Date: 2009-10-19 09:45:27 -0400 (Mon, 19 Oct 2009)
New Revision: 29662
Added:
labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/profile-ant-demo.properties
labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/tm/performance/TestDemo.java
labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-demo.xml
Log:
added
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/profile-ant-demo.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/profile-ant-demo.properties (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/main/resources/profile-ant-demo.properties 2009-10-19 13:45:27 UTC (rev 29662)
@@ -0,0 +1,75 @@
+#
+# Is the profiler on or off when the app starts?
+# (on | off)
+# default = on
+#
+profiler=on
+#
+# Can the profiler be controlled remotely ?
+# (on | off)
+# default = off
+#
+remote=off
+#
+# TCP listen port for remote control
+# default =15599
+#
+port=15599
+#
+#
+ClassLoaderFilter.1=com.mentorgen.tools.profile.instrument.clfilter.StandardClassLoaderFilter
+ClassLoaderFilter.2=com.mentorgen.tools.profile.instrument.clfilter.AntTaskClassLoaderFilter
+#accept-class-loaders=sun.misc.Launcher$AppClassLoader
+#
+# What is the maximum depth for thread dumps
+# (-1 means no limit)
+# default = -1
+# (you may also use 'compact')
+#
+thread-depth=compact
+#
+# When compacting thread dumps, what in the minimum total time you want
+# to show
+# default = 10 (ms)
+#
+thread.compact.threshold.ms=1
+#
+# What is the maximum number of methods to show in the method dump
+# (-1 means no limit)
+# default = -1
+# (you may also use 'compact')
+#
+max-method-count=compact
+#
+# defaults to 10
+#
+method.compact.threshold.ms=1
+#
+# What is the default file name for the profile information
+# default=./profile.txt
+#
+#file=/tmp/profile.txt
+#
+# specify a directory and jip will create uniquely named files.
+file=/home/whitingjr/eclipse/v3.5-galileo/workspaces/performance/performance/logs
+#
+# What packages are excluded from the display
+# (comma separated)
+# Note: com.mentorgen.tools.profile is always excluded
+#
+exclude=org.apache.lo4j.*
+include=org.jboss.application.Demo
+#
+# Track Object Allocation (very expensive)
+# values: on, off
+# default = off
+#
+track.object.alloc=off
+#
+#output=text
+output=xml
+#output-method-signatures=yes
+#profiler-class=net.sourceforge.jiprof.timeline.TimeLineProfiler
+#clock-resolution=ms
+
+debug=on
\ No newline at end of file
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/tm/performance/TestDemo.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/tm/performance/TestDemo.java (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/java/org/jboss/tm/performance/TestDemo.java 2009-10-19 13:45:27 UTC (rev 29662)
@@ -0,0 +1,64 @@
+ /*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.tm.performance;
+
+import org.apache.log4j.Logger;
+import org.jboss.application.Demo;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+public class TestDemo
+{
+ private static final Logger logger = Logger.getLogger(TestDemo.class);
+ private String repeatCount;
+
+ public String getRepeatCount()
+ {
+ return repeatCount;
+ }
+
+ public void setRepeatCount(String repeatCount)
+ {
+ this.repeatCount = repeatCount;
+ }
+
+ @Test (groups="demo.tests")
+ public void runWarmUp() throws Exception
+ {
+ Demo application = new Demo();
+ int repeat = Integer.valueOf(getRepeatCount()).intValue();
+ logger.info("The application will be executed ["+repeat+"] times.");
+ for (int count =0; count < repeat ; count = count + 1)
+ {
+ application.main(new String[]{});
+ }
+ }
+
+ @BeforeTest (groups = "demo.tests")
+ @Parameters ({"repeat_test"})
+ public void setUp(String repeatCount)
+ {
+ this.setRepeatCount(repeatCount);
+ }
+}
Added: labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-demo.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-demo.xml (rev 0)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/src/test/resources/testsuite-integration-demo.xml 2009-10-19 13:45:27 UTC (rev 29662)
@@ -0,0 +1,18 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="Demo-application-tests-report" verbose="2">
+
+ <parameter name="repeat_test" value="1"/>
+
+ <test name="Demo tests">
+ <groups>
+ <run><include name="demo.tests"/></run>
+ </groups>
+ <classes>
+ <class name="org.jboss.tm.performance.TestDemo"/>
+ </classes>
+
+ </test>
+
+</suite>
+
More information about the jboss-svn-commits
mailing list