You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by js...@apache.org on 2004/11/15 22:50:31 UTC

svn commit: rev 71513 - in incubator/beehive/trunk/controls/test: infra/tch perf perf/bin perf/cases perf/ctlsrc perf/ctlsrc/org perf/ctlsrc/org/apache perf/ctlsrc/org/apache/beehive perf/ctlsrc/org/apache/beehive/controls perf/ctlsrc/org/apache/beehive/controls/perf perf/ctlsrc/org/apache/beehive/controls/perf/controls perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom perf/src perf/src/org perf/src/org/apache perf/src/org/apache/beehive perf/src/org/apache/beehive/controls perf/src/org/apache/beehive/controls/perf perf/src/org/apache/beehive/controls/perf/benchmarks perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy perf/src/org/apache/beehive/controls/perf/benchmarks/javabean perf/src/org/apache/beehive/controls/perf/benchmarks/javaclass perf/src/org/apache/beehive/controls/perf/benchmarks/methodinv perf/src/org/apache/beehive/controls/perf/standalone perf/src/org/apache/beehive/controls/perf/tch perf/src/org/apache/beehive/controls/perf/utils perf/webapps perf/webapps/controlsPerfWeb perf/webapps/controlsPerfWeb/WEB-INF perf/webapps/controlsPerfWeb/WEB-INF/src perf/webapps/controlsPerfWeb/WEB-INF/src/global perf/webapps/controlsPerfWeb/jpf perf/webapps/controlsPerfWeb/jpf/test perf/webapps/controlsPerfWeb/jpf/test/controls perf/webapps/controlsPerfWeb/jpf/test/controls/performance perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/dproxy perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javabean perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test perf/webapps/controlsPerfWeb/resources perf/webapps/controlsPerfWeb/resources/beehive perf/webapps/controlsPerfWeb/resources/beehive/version1 perf/webapps/controlsPerfWeb/resources/beehive/version1/images perf/webapps/controlsPerfWeb/resources/beehive/version1/javascript perf/webapps/controlsPerfWeb/resources/javascript perf/webapps/controlsPerfWeb/resources/milton perf/webapps/controlsPerfWeb/resources/milton/jsp tools/tch tools/tch/deploy tools/tch/deploy/schema tools/tch/deploy/schema/performance

Author: jsong
Date: Mon Nov 15 13:50:30 2004
New Revision: 71513

Added:
   incubator/beehive/trunk/controls/test/perf/
   incubator/beehive/trunk/controls/test/perf/bin/
   incubator/beehive/trunk/controls/test/perf/bin/benchmark.bat
   incubator/beehive/trunk/controls/test/perf/bin/benchmark.sh
   incubator/beehive/trunk/controls/test/perf/bin/perf.bat
   incubator/beehive/trunk/controls/test/perf/bin/perf.sh
   incubator/beehive/trunk/controls/test/perf/bin/run.bat
   incubator/beehive/trunk/controls/test/perf/bin/run.sh
   incubator/beehive/trunk/controls/test/perf/build.xml
   incubator/beehive/trunk/controls/test/perf/cases/
   incubator/beehive/trunk/controls/test/perf/cases/controls-perf.xml
   incubator/beehive/trunk/controls/test/perf/ctlsrc/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/StrlenControl.java
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/StrlenControlImpl.java
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarargsControl.java
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarargsControlImpl.java
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarretControl.java
   incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarretControlImpl.java
   incubator/beehive/trunk/controls/test/perf/src/
   incubator/beehive/trunk/controls/test/perf/src/org/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/CStrlen.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/IStrlen.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/StrlenDProxy.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/StrlenDProxyTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/StrlenBean.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/StrlenBeanTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javaclass/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javaclass/StrlenClassTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/methodinv/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/methodinv/StrlenMethodInvTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/StrlenPgmTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/VarargsPgmTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/VarretPgmTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/PerfTest.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/StandAlonePerfRunner.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/WebPerfRunner.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/Constants.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/PerfUtil.java
   incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/StreamCapture.java
   incubator/beehive/trunk/controls/test/perf/webapps/
   incubator/beehive/trunk/controls/test/perf/webapps/build.xml
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/src/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/src/global/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/src/global/Global.app
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/web.xml
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/error.jsp
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/index.jsp
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/dproxy/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/dproxy/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javabean/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javabean/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/beehive/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/beehive/version1/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/beehive/version1/images/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/beehive/version1/images/error-header.jpg   (contents, props changed)
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/beehive/version1/javascript/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/javascript/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/miltonResults.jsp
   incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/miltonResultsTemplate.jsp
   incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/performance/
   incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/performance/controls-perf.xsd
Modified:
   incubator/beehive/trunk/controls/test/infra/tch/schema.jar
   incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/everything-suite.xsd
   incubator/beehive/trunk/controls/test/tools/tch/deploy/setenv.sh
   incubator/beehive/trunk/controls/test/tools/tch/setenv.sh
Log:
adding first cut of controls perf, updating tch schema jar to support tch runner for controls perf, remove windows newlines from some tch env scripts

Modified: incubator/beehive/trunk/controls/test/infra/tch/schema.jar
==============================================================================
Binary files. No diff available.

Added: incubator/beehive/trunk/controls/test/perf/bin/benchmark.bat
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/bin/benchmark.bat	Mon Nov 15 13:50:30 2004
@@ -0,0 +1 @@
+java -Xmx64m -classpath %BEEHIVE_HOME%\controls\test\perf\build org.apache.beehive.controls.perf.benchmarks.%* 

Added: incubator/beehive/trunk/controls/test/perf/bin/benchmark.sh
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/bin/benchmark.sh	Mon Nov 15 13:50:30 2004
@@ -0,0 +1 @@
+java -Xmx64m -classpath $BEEHIVE_HOME/controls/test/perf/build org.apache.beehive.controls.perf.benchmarks.$* 

Added: incubator/beehive/trunk/controls/test/perf/bin/perf.bat
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/bin/perf.bat	Mon Nov 15 13:50:30 2004
@@ -0,0 +1 @@
+java -Xmx64m -classpath %BEEHIVE_HOME%\controls\test\perf\build;%BEEHIVE_HOME%\controls\test\perf\ctlbuild;%BEEHIVE_HOME%\controls\build\jars\controls.jar org.apache.beehive.controls.perf.standalone.%* 

Added: incubator/beehive/trunk/controls/test/perf/bin/perf.sh
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/bin/perf.sh	Mon Nov 15 13:50:30 2004
@@ -0,0 +1 @@
+java -Xmx64m -classpath $BEEHIVE_HOME/controls/test/perf/build:$BEEHIVE_HOME/controls/test/perf/ctlbuild:$BEEHIVE_HOME/controls/build/jars/controls.jar org.apache.beehive.controls.perf.standalone.$* 

Added: incubator/beehive/trunk/controls/test/perf/bin/run.bat
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/bin/run.bat	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,31 @@
+echo off
+
+echo *****CUSTOM CONTROL PERF RUN START*****
+echo 
+echo *****STRLEN TEST START*****
+echo
+call perf.bat StrlenPgmTest %*
+echo
+call benchmark.bat dproxy.StrlenDProxyTest %*
+echo
+call benchmark.bat methodinv.StrlenMethodInvTest %*
+echo
+call benchmark.bat javabean.StrlenBeanTest %*
+echo
+call benchmark.bat javaclass.StrlenClassTest %*
+echo
+echo *****STRLEN TEST END*****
+echo
+echo *****VARARGS TEST START*****
+echo
+call perf.bat VarargsPgmTest
+echo
+echo *****VARARGS TEST END*****
+echo
+echo *****VAR RETURN TEST START*****
+echo
+call perf.bat VarretPgmTest
+echo
+echo *****VAR RETURN TEST END*****
+echo
+echo *****CUSTOM CONTROL PERF RUN END*****

Added: incubator/beehive/trunk/controls/test/perf/bin/run.sh
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/bin/run.sh	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,29 @@
+echo "*****CUSTOM CONTROL PERF RUN START*****"
+echo ""
+echo "*****STRLEN TEST START*****"
+echo ""
+sh ./perf.sh StrlenPgmTest $*
+echo ""
+sh ./benchmark.sh dproxy.StrlenDProxyTest $*
+echo ""
+sh ./benchmark.sh methodinv.StrlenMethodInvTest $*
+echo ""
+sh ./benchmark.sh javabean.StrlenBeanTest $*
+echo ""
+sh ./benchmark.sh javaclass.StrlenClassTest $*
+echo ""
+echo "*****STRLEN TEST END*****"
+echo ""
+echo "*****VARARGS TEST START*****"
+echo ""
+sh ./perf.sh VarargsPgmTest
+echo ""
+echo "*****VARARGS TEST END*****"
+echo ""
+echo "*****VAR RETURN TEST START*****"
+echo ""
+sh ./perf.sh VarretPgmTest
+echo ""
+echo "*****VAR RETURN TEST END*****"
+echo ""
+echo "*****CUSTOM CONTROL PERF RUN END*****"

Added: incubator/beehive/trunk/controls/test/perf/build.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/build.xml	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,193 @@
+<!-- build file -->
+<project name="controls_perf" default="usage">
+
+	<target name="usage">
+		<echo>
+Usage:
+[re]build - builds everything
+[re]build.tests - build tests and utils
+[re]build.controls - build controls only
+clean - cleans everything
+clean.tests - just clean tests and utils
+clean.controls	- just clean controls
+		</echo>
+	</target>
+
+	
+	<property environment="os"/>
+
+	<!-- standard beehive jars come from these prop files -->
+	<property file="${os.BEEHIVE_HOME}/beehive.properties"/>
+	<property file="${os.BEEHIVE_HOME}/controls/test/common/path.properties"/>
+
+	<!-- root dirs for finding everything  -->
+	<property name="beehive.home" value="${os.BEEHIVE_HOME}"/>
+	<property name="control.perf.root" value="${beehive.home}/controls/test/perf"/>	
+
+	<!-- control perf dirs -->
+	<property name="control.perf.ctlsrc" value="${control.perf.root}/ctlsrc"/>
+	<property name="control.perf.ctlbuild" value="${control.perf.root}/ctlbuild"/>
+	<property name="control.perf.src" value="${control.perf.root}/src"/>
+	<property name="control.perf.build" value="${control.perf.root}/build"/>
+	<property name="control.perf.cases" value="${control.perf.root}/cases"/>
+	<property name="control.perf.temp" value="${control.perf.root}/temp"/>
+
+	<!-- test run configuration (for web-based scenarios) -->
+	<property name="test.hostname" value="localhost"/>
+	<property name="test.port" value="8080"/>
+
+	<!-- classpaths -->
+	<path id="build.classpath">
+		<pathelement path="${controls.jar}"/>
+		<pathelement path="${tch.jar}"/>
+		<pathelement path="${milton.jar}"/>
+		<pathelement path="${httpunit.jar}"/>
+		<pathelement path="${control.perf.build}"/>
+		<pathelement path="${control.perf.ctlbuild}"/>
+	</path>
+
+	<path id="control.build.classpath">
+		<pathelement path="${controls.jar}"/>
+		<pathelement path="${velocitydep14.jar}"/>
+		<pathelement path="${control.perf.ctlbuild}"/>
+		<pathelement path="${control.perf.temp}"/>
+	</path>
+
+	<path id="tch.run.classpath">
+		<pathelement path="${tch.jar}"/>
+		<pathelement path="${tch.schema.jar}"/>
+		<pathelement path="${tch.xbean.jar}"/>
+		<pathelement path="${ant.jar}"/>
+		<pathelement path="${ant.home}/lib/ant-launcher.jar"/>
+		<pathelement path="${jakarta.jar}"/>
+		<pathelement path="${httpunit.jar}"/>
+		<pathelement path="${httpunit-xerces.jar}"/>
+		<pathelement path="${nekohtml.jar}"/>
+		<pathelement path="${control.perf.build}"/>
+	</path>
+
+	<!-- task definitions  -->
+  <taskdef name="apt" 
+					 classname="org.apache.beehive.controls.runtime.generator.AptTask" 
+           classpathref="control.build.classpath" 
+					 onerror="report" />
+
+  <taskdef name="tch"
+           classname="org.apache.beehive.test.tools.tch.TchVMTask"
+           classpathref="tch.run.classpath"/>
+
+	<!-- build targets -->
+	<target name="build.controls">
+		<delete dir="${control.perf.ctlbuild}/lib"/>
+		<mkdir dir="${control.perf.ctlbuild}"/>
+		<mkdir dir="${control.perf.ctlbuild}/lib"/>
+    <apt srcdir="${control.perf.ctlsrc}" destdir="${control.perf.ctlbuild}" gendir="${control.perf.temp}"
+         classpathref="control.build.classpath" 
+         srcExtensions="*.java,*.jcx,*.jcs" >
+    </apt>
+		<jar destfile="${control.perf.ctlbuild}/lib/customcontrols.jar" 
+				 basedir="${control.perf.ctlbuild}"
+				 excludes="**/lib/**"/>
+	</target>
+
+	<target name="build.tests">
+		<mkdir dir="${control.perf.build}"/>
+		<javac srcdir="${control.perf.src}"
+			destdir="${control.perf.build}"
+			debug="on"
+			fork="yes"
+			memoryMaximumSize="1000M"
+			compiler="modern"
+			executable="${os.JAVA_HOME}/bin/javac"
+			classpathref="build.classpath"
+			source="1.5">
+		</javac>
+	</target>
+
+	<target name="controlperf.jar">
+		<mkdir dir="${control.perf.build}/lib"/>
+		<jar destfile="${control.perf.build}/lib/controlperf.jar" 
+				 basedir="${control.perf.build}"
+				 excludes="**/lib/**"/>
+	</target>
+
+	<target name="clean" depends="clean.tests,clean.controls"/>
+
+	<target name="clean.tests">
+		<delete dir="${control.perf.build}"/>
+		<delete dir="${control.perf.temp}"/>
+	</target>
+
+	<target name="clean.controls">
+		<delete dir="${control.perf.ctlbuild}"/>
+		<delete dir="${control.perf.temp}"/>
+	</target>
+
+	<target name="rebuild" depends="rebuild.controls,rebuild.tests"/>
+	<target name="rebuild.controls" depends="clean.controls,build.controls"/>
+	<target name="rebuild.tests" depends="clean.tests,build.tests,controlperf.jar"/>
+
+	<!-- tch run targets -->
+	<target name="run_client">
+
+		<property name="gtlf.dtd.use.remote" value="true"/>
+		<property name="gtlf.dtd.remote" value="http://svn.apache.org/viewcvs.cgi/*checkout*/incubator/beehive/trunk/controls/test/infra/gtlf/gtlf-config-2.0.dtd?root=Apache-SVN"/>
+		<property name="gtlf.dtd.local" value="infra/gtlf/gtlf-config-2.0.dtd"/>
+		<property name="tch.base-logfile-name" value="tch"/>
+
+		<tch  tchHome="${tch.home}"
+	     		testfile="${test-suite}"
+	   		  fork="true"
+	   		  classpathref="tch.run.classpath"
+	  	    failureproperty="run.failed"
+	   		  dir="${control.perf.root}">
+          <arg value="-emacs"/>
+					<env key="CONTROLS_PERFROOT" value="${control.perf.root}"/>
+          <property name="control.perf.root" value="${control.perf.root}"/>
+	  	    <property name="test.hostname" value="${test.hostname}" />
+	   		  <property name="test.port" value="${test.port}" />
+					<property name="tch.log.date-format" value=""/>
+          <property name="tch.replication.entry-point" value="ant -f ${control.perf.root}/build.xml run"/>
+          <property name="tch.filter.frequencies" value="${test.freq}"/>
+	  	    <sysproperty key="gtlf.dtd.use.remote" value="${gtlf.dtd.use.remote}"/>
+	   		  <sysproperty key="gtlf.dtd.remote" value="${gtlf.dtd.remote}"/>
+	   		  <sysproperty key="gtlf.dtd.local" value="${gtlf.dtd.local}"/>
+  	</tch>
+		<ant antfile="${controls.test.infra.dir}/tch/runtime/build.xml" target="generate-html-log" dir="${control.perf.root}">
+			<property name="gtlf.file" value="${control.perf.root}/${tch.base-logfile-name}.xml"/>
+			<property name="output.file" value="${control.perf.root}/${tch.base-logfile-name}.html"/>
+    </ant>
+  </target>  
+
+	<target name="bvt_client">
+		<property name="test-suite" value="${control.perf.root}/cases/controls-perf.xml"/>
+		<property name="test.freq" value="bvt"/>
+		<property name="tch.log.debug-level" value="0"/>
+		<property name="tch.fail-build" value="true"/>
+		<property name="tch.replication.entry-point" value="ant -f ${controls.perf.root}/build.xml bvt"/>
+		<antcall target="run_client"/>
+	</target>
+
+	<!-- run targets that start tomcat, buid/deploy webapp, run tests and then undeploy/stop -->	
+  <target name="bvt">
+		<parallel>
+			<echo message="start a new thread to build controlsWeb and start/deploy tomcat"/>
+     	<ant antfile="webapps/build.xml" target="start"/>
+			<sequential>
+				<ant antfile="webapps/build.xml" target="clean" />
+				<ant antfile="webapps/build.xml" target="build" />
+				<echo message="sleep to allow tomcat to become available for deployment"/>
+				<sleep seconds="20"/>
+				<echo message="continue the new thread, deploy controlsWeb"/>
+				<ant antfile="webapps/build.xml" target="ensure.deployed"/>
+				<echo message="continue the new thread, run perf tests"/>
+				<antcall target="bvt_client"/>
+				<echo message="continue the new thread, undeploy controlsWeb"/>
+				<ant antfile="webapps/build.xml" target="undeploy"/>
+				<echo message="stop tomcat server, finish the new thread"/>
+        <ant antfile="webapps/build.xml" target="stop"/>
+			</sequential>
+    </parallel>
+  </target>	 
+
+</project>

Added: incubator/beehive/trunk/controls/test/perf/cases/controls-perf.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/cases/controls-perf.xml	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,136 @@
+<project name="tch" default="suite">
+	<taskdef name="controlsperf" classname="org.apache.beehive.controls.perf.tch.PerfTest"/>
+  <target name="suite">
+		<test-suite testunit="controls-perf">
+		<test-metadata>
+			<freq>bvt</freq>
+		</test-metadata>
+			<test name="StrlenPgmTest_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/perf StrlenPgmTest</cmdline>
+					<hash>-1989672960</hash>
+					<bar>4026</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenPgmTest_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf</url>
+					<hash>-1989672960</hash>
+					<bar>4026</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenDProxyBenchmark_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/benchmark dproxy.StrlenDProxyTest</cmdline>
+					<hash>-1989672960</hash>
+					<bar>724</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenDProxyBenchmark_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/dproxy/Controller.jpf</url>
+					<hash>-1989672960</hash>
+					<bar>1116</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenMethodInvBenchmark_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/benchmark methodinv.StrlenMethodInvTest</cmdline>
+					<hash>-1989672960</hash>
+					<bar>11397</bar>
+					<drift>0.10</drift>
+					<timeout>100000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenMethodInvBenchmark_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf</url>
+					<hash>-1989672960</hash>
+					<bar>11928</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenJavabeanBenchmark_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/benchmark javabean.StrlenBeanTest</cmdline>
+					<hash>-1989672960</hash>
+					<bar>42</bar>
+					<drift>0.10</drift>
+					<timeout>1000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenJavabeanBenchmark_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javabean/Controller.jpf</url>
+					<hash>-1989672960</hash>
+					<bar>65</bar>
+					<drift>0.10</drift>
+					<timeout>1000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenJavaclassBenchmark_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/benchmark javaclass.StrlenClassTest</cmdline>
+					<hash>-1989672960</hash>
+					<bar>42</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="StrlenJavaclassBenchmark_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf</url>
+					<hash>-1989672960</hash>
+					<bar>65</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="VarargsPgmTest_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/perf VarargsPgmTest</cmdline>
+					<hash>-1284084288</hash>
+					<bar>4031</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="VarargsPgmTest_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf</url>
+					<hash>-1284084288</hash>
+					<bar>4031</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="VarretPgmTest_standalone">
+        <controlsperf>
+					<cmdline>%{control.perf.root}/bin/perf VarretPgmTest</cmdline>
+					<hash>95000000</hash>
+					<bar>12242</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+			<test name="VarretPgmTest_jpf">
+        <controlsperf>
+					<url>http://%{test.hostname}:%{test.port}/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf</url>
+					<hash>95000000</hash>
+					<bar>12242</bar>
+					<drift>0.10</drift>
+					<timeout>10000</timeout>
+				</controlsperf>
+      </test>
+		</test-suite>
+  </target>
+</project>

Added: incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/StrlenControl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/StrlenControl.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,9 @@
+package org.apache.beehive.controls.perf.controls.custom;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface
+public interface StrlenControl
+{
+	public int stringLength(String input);
+}

Added: incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/StrlenControlImpl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/StrlenControlImpl.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,9 @@
+package org.apache.beehive.controls.perf.controls.custom;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+@ControlImplementation
+public class StrlenControlImpl implements StrlenControl
+{
+	public int stringLength(String input){ return input.length();}
+}

Added: incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarargsControl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarargsControl.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,9 @@
+package org.apache.beehive.controls.perf.controls.custom;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface
+public interface VarargsControl
+{
+	public int getIntSum(int... args);
+}

Added: incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarargsControlImpl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarargsControlImpl.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,18 @@
+package org.apache.beehive.controls.perf.controls.custom;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+@ControlImplementation
+public class VarargsControlImpl implements VarargsControl
+{
+	public int getIntSum(int... args)
+  { 
+    int result = 0;
+    for(int arg : args)
+    {
+      result += arg;
+    }
+
+    return result;
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarretControl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarretControl.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,9 @@
+package org.apache.beehive.controls.perf.controls.custom;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface
+public interface VarretControl
+{
+	public String createString(int p_size);
+}

Added: incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarretControlImpl.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/ctlsrc/org/apache/beehive/controls/perf/controls/custom/VarretControlImpl.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,18 @@
+package org.apache.beehive.controls.perf.controls.custom;
+
+import java.lang.StringBuffer;
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+@ControlImplementation
+public class VarretControlImpl implements VarretControl
+{
+	public String createString(int p_size)
+  { 
+    StringBuffer buff = new StringBuffer();
+    for(int i=0; i<p_size; i++)
+    {
+      buff.append("z");
+    }
+    return buff.toString();
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/CStrlen.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/CStrlen.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,9 @@
+package org.apache.beehive.controls.perf.benchmarks;
+
+public class CStrlen
+{
+  public int stringLength(String p_value)
+  {
+    return p_value.length();
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/IStrlen.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/IStrlen.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,6 @@
+package org.apache.beehive.controls.perf.benchmarks.dproxy;
+
+public interface IStrlen
+{
+  public Integer stringLength(String input);
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/StrlenDProxy.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/StrlenDProxy.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,13 @@
+package org.apache.beehive.controls.perf.benchmarks.dproxy;
+
+import java.lang.reflect.Method;
+
+public class StrlenDProxy implements java.lang.reflect.InvocationHandler
+{
+  public Object invoke(Object proxy, Method m, Object[] args) throws Throwable
+  {
+    Integer result = new Integer( ((String)args[0]).length());
+    return result;
+  }
+
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/StrlenDProxyTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/dproxy/StrlenDProxyTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,59 @@
+package org.apache.beehive.controls.perf.benchmarks.dproxy;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+import java.lang.reflect.Proxy;
+import org.apache.beehive.controls.perf.benchmarks.dproxy.IStrlen;
+import org.apache.beehive.controls.perf.benchmarks.dproxy.StrlenDProxy;
+
+public class StrlenDProxyTest
+{
+  public static void main(String[] args) throws Throwable
+  {
+    System.out.println("TEST: "+StrlenDProxyTest.class.getName());
+    final int iterations = Constants.STRLEN_ITERATIONS;
+    String input = "";
+
+    PerfUtil util = new PerfUtil();
+    if(args.length == 0){
+      input = util.createString(Constants.DEFAULT_STR_SIZE);
+    }
+    else{
+      input = util.createString(Integer.parseInt(args[0]));
+    }
+
+    StrlenDProxyTest test = new StrlenDProxyTest();   
+    long cputime;
+    int stringSum = 0;
+
+    // instantiate the proxy to be used in the test
+    Class[] proxyInterfaces = new Class[]{IStrlen.class};
+    IStrlen strlen = (IStrlen) Proxy.newProxyInstance(IStrlen.class.getClassLoader(),
+                                                      proxyInterfaces,
+                                                      new StrlenDProxy());
+
+    // warm up the vm
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,strlen);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // run it again for the real measurement
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,strlen);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // print the results
+    System.out.println("hash="+stringSum);
+    System.out.println("time="+cputime);
+  }
+
+  private int run(String input, IStrlen strlen) throws Throwable
+  {
+    return strlen.stringLength(input);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/StrlenBean.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/StrlenBean.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,15 @@
+package org.apache.beehive.controls.perf.benchmarks.javabean;
+
+public class StrlenBean implements java.io.Serializable
+{
+  // some bean-like methods
+  private int _value;
+  public void setInt(int p_value)
+  {
+    _value = p_value;
+  }
+  public int getInt(){return _value;}
+
+  // the actual test method
+  public int stringLength(String p_input){return p_input.length();}
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/StrlenBeanTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javabean/StrlenBeanTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,54 @@
+package org.apache.beehive.controls.perf.benchmarks.javabean;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+import org.apache.beehive.controls.perf.benchmarks.javabean.StrlenBean;
+
+
+public class StrlenBeanTest
+{
+  public static void main(String[] args) throws Throwable
+  {
+    System.out.println("TEST: "+StrlenBeanTest.class.getName());
+    final int iterations = Constants.STRLEN_ITERATIONS;
+    String input = "";
+
+    PerfUtil util = new PerfUtil();
+    if(args.length == 0){
+      input = util.createString(Constants.DEFAULT_STR_SIZE);
+    }
+    else{
+      input = util.createString(Integer.parseInt(args[0]));
+    }
+   
+    StrlenBeanTest test = new StrlenBeanTest();   
+    long cputime;
+    int stringSum = 0;
+
+    // instantiate the bean for the test
+    StrlenBean bean = new StrlenBean();
+
+    // warm up the vm
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,bean);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // run it again for the real measurement
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,bean);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // print the results
+    System.out.println("hash="+stringSum);
+    System.out.println("time="+cputime);
+  }
+
+  private int run(String input, StrlenBean bean) throws Throwable
+  {        
+    return bean.stringLength(input);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javaclass/StrlenClassTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/javaclass/StrlenClassTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,56 @@
+package org.apache.beehive.controls.perf.benchmarks.javaclass;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+import org.apache.beehive.controls.perf.benchmarks.CStrlen;
+
+
+public class StrlenClassTest
+{
+  public static void main(String[] args) throws Throwable
+  {
+    System.out.println("TEST: "+StrlenClassTest.class.getName());
+    final int iterations = Constants.STRLEN_ITERATIONS;
+    String input = "";
+
+    PerfUtil util = new PerfUtil();
+    if(args.length == 0){
+      input = util.createString(Constants.DEFAULT_STR_SIZE);
+    }
+    else{
+      input = util.createString(Integer.parseInt(args[0]));
+    }
+
+   
+    StrlenClassTest test = new StrlenClassTest();   
+    long cputime;
+    int stringSum = 0;
+
+    // instantiate the class to be used in the test
+    CStrlen strlen = new CStrlen();
+
+    // warm up the vm
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,strlen);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // run it again for the real measurement
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,strlen);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // print the results
+    System.out.println("hash="+stringSum);
+    System.out.println("time="+cputime);
+  }
+
+  private int run(String input, CStrlen strlen) throws Throwable
+  {        
+    return strlen.stringLength(input);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/methodinv/StrlenMethodInvTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/benchmarks/methodinv/StrlenMethodInvTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,58 @@
+package org.apache.beehive.controls.perf.benchmarks.methodinv;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+import org.apache.beehive.controls.perf.benchmarks.CStrlen;
+import java.lang.reflect.Method;
+
+public class StrlenMethodInvTest
+{
+  public static void main(String[] args) throws Throwable
+  {
+    System.out.println("TEST: "+StrlenMethodInvTest.class.getName());
+    final int iterations = Constants.STRLEN_ITERATIONS;
+    String input = "";
+
+    PerfUtil util = new PerfUtil();
+    if(args.length == 0){
+      input = util.createString(Constants.DEFAULT_STR_SIZE);
+    }
+    else{
+      input = util.createString(Integer.parseInt(args[0]));
+    }
+   
+    StrlenMethodInvTest test = new StrlenMethodInvTest();   
+    long cputime;
+    int stringSum = 0;
+
+    // instantiate the method to be used for the test
+    Method method = CStrlen.class.getMethod("stringLength",new Class[]{String.class});
+
+    // warm up the vm
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,method);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // run it again for the real measurement
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,method);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // print the results
+    System.out.println("hash="+stringSum);
+    System.out.println("time="+cputime);
+  }
+
+  private int run(String input, Method method) throws Throwable
+  {          
+    //Method[] methods = CStrlen.class.getMethods();
+    //Object oResult = methods[0].invoke(CStrlen.class.newInstance(),(Object)input);
+    
+    Object oResult = method.invoke(CStrlen.class.newInstance(),(Object)input);
+    return ( (Integer)oResult ).intValue();
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/StrlenPgmTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/StrlenPgmTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,56 @@
+package org.apache.beehive.controls.perf.standalone;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+// custom control
+import org.apache.beehive.controls.perf.controls.custom.StrlenControlBean;
+
+public class StrlenPgmTest
+{
+  public static void main(String[] args) throws Exception
+  {
+    System.out.println("TEST: "+StrlenPgmTest.class.getName());
+    final int iterations = Constants.STRLEN_ITERATIONS;
+    String input = "";
+
+    PerfUtil util = new PerfUtil();
+    if(args.length == 0){
+      input = util.createString(Constants.DEFAULT_STR_SIZE);
+    }
+    else{
+      input = util.createString(Integer.parseInt(args[0]));
+    }
+  
+    StrlenPgmTest test = new StrlenPgmTest();
+    long cputime;
+    int stringSum = 0;
+
+    // programatically instantiate the control to be used by the test
+    StrlenControlBean control = (StrlenControlBean)java.beans.Beans.instantiate(null,"org.apache.beehive.controls.perf.controls.custom.StrlenControlBean");
+
+    // warm up the vm
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,control);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // run it again for the real measurement
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      stringSum += test.run(input,control);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    // print the results
+    System.out.println("hash="+stringSum);
+    System.out.println("time="+cputime);
+
+  }
+
+  private int run(String input, StrlenControlBean control) throws Exception
+  {
+    return(control.stringLength(input));
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/VarargsPgmTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/VarargsPgmTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,76 @@
+package org.apache.beehive.controls.perf.standalone;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+// custom contol
+import org.apache.beehive.controls.perf.controls.custom.VarargsControlBean;
+
+public class VarargsPgmTest
+{
+  public static void main(String[] args) throws Exception
+  {
+    // programatically instantiate the control to be used by the test
+    VarargsControlBean control = (VarargsControlBean)java.beans.Beans.instantiate(null,"org.apache.beehive.controls.perf.controls.custom.VarargsControlBean");
+
+    final int iterations = Constants.VARARGS_ITERATIONS;
+    PerfUtil util = new PerfUtil();
+    int[] input = util.createIntArray(Constants.DEFAULT_VARARG_PARAMS[Constants.DEFAULT_VARARG_PARAMS.length-1]);
+
+    System.out.println("TEST: "+VarargsPgmTest.class.getName());  
+    VarargsPgmTest test = new VarargsPgmTest();
+    long cputime;
+    int hash = 0;
+
+    // warm up the vm with the largest array input
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      hash += test.run(input,control);
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    int sum = 0;
+    long duration = 0;
+    cputime = 0;
+    for(int j=0; j<Constants.DEFAULT_VARARG_PARAMS.length; j++)
+    {
+      input = util.createIntArray(Constants.DEFAULT_VARARG_PARAMS[j]);
+      sum = 0;
+      // run it again for the real measurement
+      duration = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        sum += test.run(input,control);
+      }
+      duration = System.currentTimeMillis() - duration;
+
+      // print the results
+      System.out.println("array size="+input.length);
+      System.out.println("expected sum="+expectedSum(input));
+      System.out.println("actual sum="+sum);
+      System.out.println("duration="+duration+"\n");
+
+      // update the overall result
+      hash += sum;
+      cputime += duration;
+    }
+    System.out.println("hash="+hash);
+    System.out.println("time="+cputime);
+  }
+
+  private int run(int[] input, VarargsControlBean control) throws Exception
+  {
+    return(control.getIntSum(input));
+  }
+
+  private static int expectedSum(int[] p_intArray)
+  {
+    int result = 0;
+    for(int i : p_intArray)
+    {
+      result += i;
+    }
+
+    result = Constants.VARARGS_ITERATIONS*result;
+    return result;
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/VarretPgmTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/standalone/VarretPgmTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,62 @@
+package org.apache.beehive.controls.perf.standalone;
+
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+// custom contol
+import org.apache.beehive.controls.perf.controls.custom.VarretControlBean;
+
+public class VarretPgmTest
+{
+  public static void main(String[] args) throws Exception
+  {
+    // programatically instantiate the control to be used by the test
+    VarretControlBean control = (VarretControlBean)java.beans.Beans.instantiate(null,"org.apache.beehive.controls.perf.controls.custom.VarretControlBean");
+
+    final int iterations = Constants.VARRET_ITERATIONS;
+    int[] input = Constants.DEFAULT_VARRET_PARAMS;
+
+    System.out.println("TEST: "+VarretPgmTest.class.getName());  
+    VarretPgmTest test = new VarretPgmTest();
+    long cputime;
+    int hash = 0;
+
+    // warm up the vm with the largest int value input
+    cputime = System.currentTimeMillis();
+    for(int i=0; i<iterations; i++){
+      hash += test.run(input[input.length-1],control).length();
+    }
+    cputime = System.currentTimeMillis() - cputime;
+
+    long duration = 0;
+    int length = 0;
+    cputime = 0;
+    for(int j=0; j<Constants.DEFAULT_VARRET_PARAMS.length; j++)
+    {
+      length = 0;
+      // run it again for the measurement
+      duration = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        length += test.run(input[j],control).length();
+      }
+      duration = System.currentTimeMillis() - duration;
+
+      // print the results
+      System.out.println("input="+input[j]);
+      System.out.println("length sum="+length);
+      System.out.println("duration="+duration+"\n");
+
+      // update the overall result
+      hash += length;
+      cputime += duration;
+    }
+    System.out.println("hash="+hash);
+    System.out.println("time="+cputime);
+  }
+
+  private String run(int input, VarretControlBean control) throws Exception
+  {
+    return(control.createString(input));
+  }
+
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/PerfTest.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/PerfTest.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,197 @@
+package org.apache.beehive.controls.perf.tch;
+
+// java utils
+import java.io.File;
+import java.util.StringTokenizer;
+import java.lang.InterruptedException;
+// tch requirements
+import org.apache.beehive.test.tools.tch.core.AbstractExecutionTask;
+import org.apache.beehive.test.tools.tch.core.ExecutionTaskValidationException;
+import org.apache.beehive.test.tools.tch.core.test.AbstractTestLogicTask;
+import org.apache.beehive.test.tools.tch.core.test.TestLogicTask;
+import org.apache.beehive.test.tools.tch.core.test.ResultHandler;
+import org.apache.beehive.test.tools.tch.task.TaskContext;
+
+/**
+ * @author jzyskows@bea.com
+ */
+public class PerfTest extends AbstractExecutionTask
+{
+  // suppored parameters
+  private String _sCmdline = null;
+  private String _sUrl = null;
+  private int _iHash;
+  private float _fBar;
+  private float _fDrift;
+  private long _lTimeout;
+
+  // required for init-mode
+  public void validate() throws ExecutionTaskValidationException
+  {
+    // placeholder
+    if(false)
+    {
+      throw new ExecutionTaskValidationException("NYI");
+    }
+  }
+
+  // returns test logic implementation based on test params
+  public synchronized TestLogicTask getTestLogicTask()
+  {
+    // instantiate the correct logic task type
+    if(null != _sCmdline && null == _sUrl)
+    {
+      StandAlonePerfRunner logicTask = new StandAlonePerfRunner(getResultHandler());
+      logicTask.init(_sCmdline,
+                     _iHash,
+                     _fBar,
+                     _fDrift,
+                     _lTimeout);
+      return logicTask;
+    }
+    else if(null != _sUrl && null == _sCmdline)
+    {
+      WebPerfRunner logicTask = new WebPerfRunner(getResultHandler());
+      logicTask.init(_sUrl,
+                     _iHash,
+                     _fBar,
+                     _fDrift,
+                     _lTimeout);
+      return logicTask;
+    }
+    // TODO: throw a proper error
+    return null;
+  }
+
+  ////////////////////////
+  // used for handling xml 
+  ////////////////////////
+
+  // attribute setter(s) 
+  /*public void setFoo(String foo)
+  {
+    if(foo.equalsIgnoreCase("bar"))bBooleanValue = true;
+    }*/
+
+  // end attribute setter(s)
+
+  // element setter(s)
+  public void addConfiguredCmdline(Cmdline p_cmdline)
+	{
+		this._sCmdline = handleValue(p_cmdline.getText());
+	}
+
+  public void addConfiguredUrl(Url p_url)
+	{
+		this._sUrl = handleValue(p_url.getText());
+	}
+
+  public void addConfiguredHash(Hash p_hash)
+	{
+		this._iHash = Integer.parseInt(handleValue(p_hash.getText()));
+	}
+
+  public void addConfiguredBar(Bar p_bar)
+	{
+		this._fBar = Float.parseFloat(handleValue(p_bar.getText()));
+	}
+
+  public void addConfiguredDrift(Drift p_drift)
+	{
+		this._fDrift = Float.parseFloat(handleValue(p_drift.getText()));
+	}
+
+  public void addConfiguredTimeout(Timeout p_timeout)
+  {
+    this._lTimeout = Long.parseLong(handleValue(p_timeout.getText()));
+  }
+  // end element setter(s)
+  
+  // classes that describe/handle xml data
+  public static class Cmdline
+  {
+    private String _sCmdline;
+    public void addText(String value)
+    {
+      String cmd = null;
+      String args = "";
+
+      // normalize file separator for the entire string
+      value = value.replace('/',File.separator.charAt(0));
+      
+      // separate executable and args
+      StringTokenizer st = new StringTokenizer(value," ");
+      cmd = st.nextToken();
+      while(st.hasMoreTokens()){
+        args += " ";
+        args += st.nextToken();
+      }
+
+      // normalize for executable
+      if(System.getProperty("os.name").indexOf("Windows") != -1)
+      {
+        cmd = cmd+".bat";
+      }
+      else
+      {
+        cmd = "sh "+cmd+".sh";
+      }
+      this._sCmdline = cmd+args;
+    }
+    public String getText(){return _sCmdline;}
+  }
+
+  public static class Url
+  {
+    private String _sUrl;
+    public void addText(String value)
+    {
+      this._sUrl = value;
+    }
+    public String getText(){return _sUrl;}
+  }
+
+  public static class Hash
+  {
+    private String _sHash;
+    public void addText(String value)
+    {
+      this._sHash = value;
+    }
+    public String getText(){return _sHash;}
+  }
+
+ 	public static class Bar
+	{
+			private String _sBar;
+			public void addText(String value)
+			{
+					this._sBar = value;
+			}
+			
+			public String getText(){return _sBar;}
+	}
+
+  public static class Drift
+	{
+			private String _sDrift;
+			public void addText(String value)
+			{
+					this._sDrift = value;
+			}
+			
+			public String getText(){return _sDrift;}
+	}
+
+  public static class Timeout
+  {
+    private String _sTimeout;
+    public void addText(String value)
+    {
+      this._sTimeout = value;
+    }
+    public String getText(){return _sTimeout;}
+  }
+
+ }
+

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/StandAlonePerfRunner.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/StandAlonePerfRunner.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,126 @@
+package org.apache.beehive.controls.perf.tch;
+
+import java.lang.InterruptedException;
+import java.lang.Math;
+import java.io.IOException;
+import java.util.StringTokenizer;
+
+import org.apache.beehive.test.tools.tch.task.TaskContext;
+import org.apache.beehive.test.tools.tch.core.test.AbstractTestLogicTask;
+import org.apache.beehive.test.tools.tch.core.test.ResultHandler;
+import org.apache.beehive.test.tools.tch.extension.exectask.common.ResultLogger;
+
+import org.apache.beehive.controls.perf.utils.StreamCapture;
+
+/**
+ * @author jzyskows@bea.com
+ */
+public class StandAlonePerfRunner extends AbstractTestLogicTask
+{
+  private String _sCmdline = null;
+  private int _iHash;
+  private float _fBar;
+  private float _fDrift;
+  private long _lTimeout;
+
+  private ResultLogger _logger;
+
+  public StandAlonePerfRunner(ResultHandler inResultHandler)
+  {
+    super("StandAlonePerfRunner",inResultHandler);
+  }
+
+  public void init(String p_sCmdline,
+                   int p_iHash,
+                   float p_fBar,
+                   float p_fDrift,
+                   long p_lTimeout)
+  {
+    // set private members
+    this._sCmdline = p_sCmdline;
+    this._iHash = p_iHash;
+    this._fBar = p_fBar;
+    this._fDrift = p_fDrift;
+    this._lTimeout = p_lTimeout;
+    this._logger = this.getResultLogger();
+  }
+
+  public TaskContext run(TaskContext in)
+  {
+    float fActualTime = -1;
+    int iActualHash = -1;
+
+    // run the commandline
+    try{
+      Process p = Runtime.getRuntime().exec(_sCmdline);
+      StreamCapture scStdErr = new StreamCapture(p.getErrorStream(), "STDERR");
+      StreamCapture scStdOut = new StreamCapture(p.getInputStream(), "STDOUT");
+      scStdErr.start();
+      scStdOut.start();
+      int iReturn = p.waitFor();
+      // wait up to the given timeout
+      scStdErr.join(_lTimeout);
+      scStdOut.join(_lTimeout);
+
+      // grab the test result from stdout
+      StringTokenizer st = new StringTokenizer(scStdOut.getString(),"\n");
+      while(st.hasMoreTokens()){
+        String sCurrent = st.nextToken();
+
+        if(sCurrent.startsWith("time=")){
+          StringTokenizer stTime = new StringTokenizer(sCurrent,"=");
+          stTime.nextToken();
+          fActualTime = Float.parseFloat(stTime.nextToken());
+        }
+        else if(sCurrent.startsWith("hash=")){
+          StringTokenizer stHash = new StringTokenizer(sCurrent,"=");
+          stHash.nextToken();
+          iActualHash = Integer.parseInt(stHash.nextToken());
+        }
+      }
+
+      // calculate the drift
+      float fActualDrift = ((fActualTime - _fBar)/_fBar);
+
+      // log the test result
+      _logger.inform("allowed hash="+_iHash);
+      _logger.inform("actual hash="+iActualHash);
+      _logger.inform("----------");
+      _logger.inform("allowed time="+_fBar);
+      _logger.inform("actual time="+fActualTime);
+      _logger.inform("----------");
+      _logger.inform("allowed drift (abs)="+_fDrift);
+      _logger.inform("actual drift="+fActualDrift);
+
+      // evaluate the result
+      if(iActualHash != _iHash)
+      {
+        _logger.failure("HASH ERROR");
+      }
+      else if(Math.abs(fActualDrift) > _fDrift)
+      {
+        if(fActualDrift < 0){
+          _logger.failure("PERF IMPROVED - QA NEEDS TO RESET THE BAR");
+        }
+        else{
+          _logger.failure("PERF REGRESSION BEYOND ALLOWED DRIFT");
+        }      
+      }
+      else{
+        _logger.success("PASS");
+      }
+    }
+    catch(InterruptedException ie){
+      _logger.failure("exceeded timeout");
+      ie.printStackTrace();
+      return null;
+    }
+    catch(IOException ioe){
+      _logger.failure("process exec threw IOException");
+      ioe.printStackTrace();
+      return null;
+    }
+    return null;
+  }
+
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/WebPerfRunner.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/tch/WebPerfRunner.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,202 @@
+package org.apache.beehive.controls.perf.tch;
+
+// java utils
+import java.lang.InterruptedException;
+import java.lang.Math;
+import java.io.IOException;
+import java.util.StringTokenizer;
+// milton requirements
+import org.apache.beehive.test.tools.milton.common.Report;
+import com.meterware.httpunit.WebConversation;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.httpunit.WebTable;
+import com.meterware.httpunit.TableCell;
+// tch requirements
+import org.apache.beehive.test.tools.tch.task.TaskContext;
+import org.apache.beehive.test.tools.tch.core.test.AbstractTestLogicTask;
+import org.apache.beehive.test.tools.tch.core.test.ResultHandler;
+import org.apache.beehive.test.tools.tch.extension.exectask.common.ResultLogger;
+
+/**
+ * @author jzyskows@bea.com
+ */
+public class WebPerfRunner extends AbstractTestLogicTask
+{
+  private String _sUrl = null;
+  private int _iHash;
+  private float _fBar;
+  private float _fDrift;
+  private long _lTimeout;
+
+  private ResultLogger _logger;
+
+  public WebPerfRunner(ResultHandler inResultHandler)
+  {
+    super("WebPerfRunner",inResultHandler);
+  }
+
+  public void init(String p_sUrl,
+                   int p_iHash,
+                   float p_fBar,
+                   float p_fDrift,
+                   long p_lTimeout)
+  {
+    // set private members
+    this._sUrl = p_sUrl;
+    this._iHash = p_iHash;
+    this._fBar = p_fBar;
+    this._fDrift = p_fDrift;
+    this._lTimeout = p_lTimeout;
+    this._logger = this.getResultLogger();
+  }
+
+  public TaskContext run(TaskContext in)
+  {
+    float fActualTime = -1;
+    UrlReport urlreport = new UrlReport(_sUrl);
+
+    try
+    {
+      // run the url report
+      if(!urlreport.assertReport())
+      {
+        _logger.failure("test failed!");
+        return null;
+      }
+
+      float actualDrift = ((urlreport.getTime()-_fBar)/_fBar);      
+
+      // log the test result from UrlReport
+      _logger.inform("allowed hash="+_iHash);
+      _logger.inform("actual hash="+urlreport.getHash());
+      _logger.inform("----------");
+      _logger.inform("allowed time="+_fBar);
+      _logger.inform("actual time="+urlreport.getTime());
+      _logger.inform("----------");
+      _logger.inform("allowed drift (abs)="+_fDrift);
+      _logger.inform("actual drift="+actualDrift);
+
+      // evaluate the result
+      if(urlreport.getHash() != _iHash)
+      {
+        _logger.failure("HASH ERROR");
+      }
+      else if(Math.abs(actualDrift) > _fDrift)
+      {
+        if(actualDrift < 0){
+          _logger.failure("PERF IMPROVED - QA NEEDS TO RESET THE BAR");
+        }
+        else{
+          _logger.failure("PERF REGRESSION BEYOND ALLOWED DRIFT");
+        }      
+      }
+      else{
+        _logger.success("PASS");
+      } 
+    }
+    catch(Throwable e){
+      _logger.failure("got throwable:"+e.getMessage());
+      StackTraceElement[] stack = e.getStackTrace();
+      for(int i=0; i<stack.length; i++)
+      {
+        _logger.inform(stack[i].toString());
+      }
+      return null;
+    }
+    return null;
+  }
+
+  
+  private class UrlReport
+  {
+    private String _url = null;
+    private int _actualHash = -1;
+    private int _actualTime = -1;
+
+    UrlReport(String p_url)
+    {
+      this._url = p_url;
+    }
+
+    boolean assertReport() throws Throwable
+    {
+      WebConversation wc = new WebConversation();
+      WebResponse wr = wc.getResponse(_url);
+
+      if(wr.getResponseCode() != 200)
+      {
+        _logger.failure("Response - FAIL - did not get 200: "+wr.getResponseCode());
+        return false;
+      }
+      else
+        _logger.debug("Response - OK - got 200");
+
+      String status = null;
+      String message = null;
+      String exception = null;
+
+      WebTable wt = wr.getTableWithID(Report.RESULT_TABLE_ID);
+      if(null == wt)
+      {
+        _logger.failure("TEST ERROR - could not find result table!");
+        return false;
+      }
+
+      TableCell statusCell = wt.getTableCellWithID(Report.STATUS_ID);
+      TableCell messageCell = wt.getTableCellWithID(Report.MESSAGE_ID);
+      TableCell exceptionCell = wt.getTableCellWithID(Report.EXCEPTION_ID);
+
+      if (null != statusCell)
+        status = statusCell.asText().trim();
+
+      if (null != messageCell)
+        message = messageCell.asText().trim();
+
+      if (null != exceptionCell)
+        exception = exceptionCell.asText().trim();
+
+      // Print Messages && Exceptions
+      if (null != message && ! message.equals(""))
+        _logger.debug("Message(s): " + message);
+
+      if (null != exception && ! exception.equals(""))
+        _logger.failure("FAIL - Exception: " + exception);
+
+      // initialize hash, time
+      StringTokenizer st = new StringTokenizer(message," ");
+      while(st.hasMoreTokens())
+      {
+        String current = st.nextToken();
+        if(current.startsWith("hash="))
+        {
+          StringTokenizer st2 = new StringTokenizer(current,"=");
+          st2.nextToken();
+          _actualHash = Integer.parseInt(st2.nextToken());
+        }
+        else if(current.startsWith("time="))
+        {
+          StringTokenizer st2 = new StringTokenizer(current,"=");
+          st2.nextToken();
+          _actualTime = Integer.parseInt(st2.nextToken());
+        }
+      }
+
+      // Check the status and report accordingly
+      if (! status.equals(Report.PASS))
+        return false;
+      else
+        return true;
+    }
+
+    float getTime()
+    {
+      return _actualTime;
+    }
+    
+    float getHash()
+    {
+      return _actualHash;
+    }
+  }
+
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/Constants.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/Constants.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,18 @@
+package org.apache.beehive.controls.perf.utils;
+
+public class Constants
+{
+
+  private Constants(){}
+  public static final int STRLEN_ITERATIONS = 10000000;
+  public static final int DEFAULT_STR_SIZE = 2048;
+
+  public static final int VARARGS_ITERATIONS = 1000000;
+  //public static final int DEFAULT_VARARG_INTERVAL = 64;
+  public static final int DEFAULT_VARARG_SIZE = 10;
+  public static final int[] DEFAULT_VARARG_PARAMS = new int[]{10,20,40,80,160,320};
+
+
+  public static final int VARRET_ITERATIONS = 10000;
+  public static final int[] DEFAULT_VARRET_PARAMS = new int[]{100,200,400,800,1600,3200};
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/PerfUtil.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/PerfUtil.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,28 @@
+package org.apache.beehive.controls.perf.utils;
+
+import java.lang.StringBuffer;
+
+public class PerfUtil
+{
+
+  public String createString(int p_size)
+  {
+    StringBuffer buff = new StringBuffer();
+    for(int i=0; i<p_size; i++)
+    {
+      buff.append("z");
+    }
+    return buff.toString();
+  }
+
+  public int[] createIntArray(int size)
+  {
+    int[] iaResult = new int[size];
+    for(int i=0; i<size; i++)
+    {
+      iaResult[i] = i;
+    }
+    return iaResult;
+  }
+
+}

Added: incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/StreamCapture.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/src/org/apache/beehive/controls/perf/utils/StreamCapture.java	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,101 @@
+package org.apache.beehive.controls.perf.utils;
+
+import java.io.*;
+import java.lang.StringBuffer;
+
+/**
+ * A utility for reading from an InputStream
+ */
+public class StreamCapture extends Thread {
+    private InputStream is;
+    private String type;
+    private String filename;
+    private String bufferContents = "";   
+
+    /**
+     * 
+     * @param is InputStream to read from
+     * @param type An identifier for this stream capture (valid values: stderr, stdout)
+     */
+    public StreamCapture(InputStream is, String type)
+    {
+        this.is = is;
+        this.type = type;
+    }
+
+    /**
+     * 
+     * @param is InputStream to read from
+     * @param type An identifier for this stream capture (valid values: stderr, stdout, file)
+     * @param file If given, the data is saved to this file vs. an in-memory string.
+     */
+    public StreamCapture(InputStream is, String type, String file)
+    {
+        this.is = is;
+        this.type = type;
+        this.filename = file;
+    }
+
+
+    /**
+     * @return The buffer contents as a string
+     */
+    public String getString()
+    {
+        return bufferContents;
+    }
+
+
+    /**
+     * Read the InputStream supplied and put into 
+     * a string which is accessed via getString() or 
+     * a file is type==file and a filename is given.
+     */
+    public void run()
+    {
+        // if type == "file" save the contents to a file
+        if(type.equalsIgnoreCase("file"))
+        {
+          try
+          {
+            InputStreamReader isr = new InputStreamReader(is);
+            BufferedReader br = new BufferedReader(isr);
+            String line = null;
+            FileWriter fw = new FileWriter(filename);
+            BufferedWriter bw = new BufferedWriter(fw);
+            while( (line = br.readLine()) != null )
+            {
+              bw.write(line);
+              bw.newLine();
+              bw.flush();
+            }
+            bw.flush();
+            bw.close();            
+          }
+          catch (IOException ioe)
+          {
+              ioe.printStackTrace();
+          }          
+        }
+        else
+        {        
+          try
+          {
+              InputStreamReader isr = new InputStreamReader(is);
+              BufferedReader br = new BufferedReader(isr);
+              StringBuffer sb = new StringBuffer();         
+              String line = null;
+              while ((line = br.readLine()) != null)
+              {
+                  sb.append(line);
+                  sb.append("\n");
+              }
+              bufferContents = sb.toString();
+          }
+          catch (IOException ioe)
+          {
+              ioe.printStackTrace();
+          }
+        }  
+    }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/build.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/build.xml	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,194 @@
+<?xml version="1.0"?>
+<!-- 
+===========================================================================
+
+  This project consists of targets to build/clean a web appplication with
+  the latest Beehive NETUI artifacts, start/stop Tomcat server, and deploy
+  the web application to a started Tomcat server.
+  
+  This project originates from trunk/netui/test/webapps/drt/build.xml for
+  code reusing.
+
+============================================================================ 
+-->
+<project name="Beehive/Controls/Perf-webapp" default="usage" basedir=".">
+
+    <property environment="os"/>
+    <property file="${os.BEEHIVE_HOME}/beehive.properties"/>
+		<property name="controls.perf.root" value="${os.BEEHIVE_HOME}/controls/test/perf"/> 
+		<property name="buildWebapp.xml" value="${os.BEEHIVE_HOME}/test/ant/buildWebapp.xml"/> 
+		<property name="runTomcat.xml" value="${os.BEEHIVE_HOME}/test/ant/runTomcat.xml"/> 
+    <property name="webapp.name" value="controlsPerfWeb"/>
+    <property name="webapp.dir" location="${controls.perf.root}/webapps/${webapp.name}"/>
+    <property name="webapp.waitfor.url" value="http://localhost:8080/${webapp.name}"/>
+
+  <target name="usage">
+    <echo message="" />
+    <echo message="" />
+    <echo message="web app build scripts for controls testing" />
+    <echo message="================================================================" />
+    <echo message="|                          Usage                               |" />
+    <echo message="================================================================" />
+    <echo message="" />
+    <echo message="-------------------------------------------------------------------" />
+    <echo message="|                       Standard Targets                          |" />
+    <echo message="-------------------------------------------------------------------" />
+    <echo message="build       - inject latest netui artifacts and build ${webapp.name}, " />
+    <echo message="              includes compiling controls in the webapp            "/>
+    <echo message="clean       - clean ${webapp.name}"/>
+    <echo message="start       - start Tomcat server"/>
+    <echo message="stop        - stop Tomcat server"/>
+    <echo message="deploy      - deploys built webapp to a started Tomcat" />
+    <echo message="" />
+    <echo message="" />
+   </target>
+
+
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for building a webapp                                    -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="build" description="build ${webapp.name}">
+        <echo message="-----------------------------------------------------"/>
+        <echo message="|    ${webapp.name} build starting    |"/>
+        <echo message="-----------------------------------------------------"/>
+
+        <!--<property name="webapp.dir" location="./${webapp.name}"/>-->
+
+				<ant antfile="${buildWebapp.xml}" target="deploy.beehive.webapp.runtime" inheritAll="false">
+					<property name="webapp.dir" value="${webapp.dir}" />
+				</ant>
+
+        <copy file="${webapp.dir}/WEB-INF/local-netui-config.xml" 
+              tofile="${webapp.dir}/WEB-INF/${netuiconfig.xml.name}" 
+              overwrite="true" failonerror="false"/>
+
+				<!-- TODO: remove this copy once milton.jar is not deleted by the updeploy.netui call -->	
+				<copy file="${beehive.dir}/controls/test/infra/milton/milton.jar" todir="${webapp.name}/WEB-INF/lib"/>
+				
+				<copy file="${controls.perf.root}/ctlbuild/lib/customcontrols.jar" todir="${webapp.name}/WEB-INF/lib"/>
+				<copy file="${controls.perf.root}/build/lib/controlperf.jar" todir="${webapp.name}/WEB-INF/lib"/>
+
+        <ant antfile="${buildWebapp.xml}" target="build.webapp" inheritAll="false">
+            <property name="webapp.dir" location="${webapp.dir}"/>
+        </ant>
+
+        <echo message="----------------------------------------------"/>
+        <echo message="|     ${webapp.name} build ending      |"/>
+        <echo message="----------------------------------------------"/>
+    </target>
+
+    <target name="clean" description="Clean webapp">
+        <echo message="----------------------------------------------"/>
+        <echo message="|     ${webapp.name} clean starting    |"/>
+        <echo message="----------------------------------------------"/>
+
+        <ant antfile="${buildWebapp.xml}" target="undeploy.beehive.webapp.runtime" inheritAll="false">
+            <property name="webapp.dir" location="./${webapp.name}"/>
+        </ant>
+
+			<!--
+        <ant antfile="${deployNetui.ant}" target="clean.webapp" inheritAll="false">
+            <property name="webapp.dir" location="./${webapp.name}"/>
+        </ant>
+			-->
+        <echo message="****************************************************"/>
+        <echo message="* milton.jar is deleted by undeploy.netui.runtime, *"/>
+        <echo message="* please put it back to ${webapp.name}/WEB-INF/lib/   *"/>
+        <echo message="****************************************************"/>
+
+
+        <echo message="----------------------------------------------"/>
+        <echo message="|     ${webapp.name} clean ending      |"/>
+        <echo message="----------------------------------------------"/>
+    </target>
+
+    <target name="scrub" depends="clean" description="Scrub webapp">
+        <delete dir="${tomcat.dir}/work/Catalina/localhost/${webapp.name}" includeEmptyDirs="true"/>
+        <delete file="${tomcat.dir}/conf/Catalina/localhost/${webapp.name}.xml"/>
+    </target>
+
+
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for deploying the webapp on a server                     -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="deploy" description="Deploy webapp">
+        <ant antfile="${runTomcat.xml}" target="deploy" inheritAll="false">
+            <property name="catalina.username" value="manager"/>
+            <property name="catalina.password" value="manager"/>
+            <property name="context.path" value="${webapp.name}"/>
+            <property name="webapp.dir" value="${webapp.dir}"/>
+            <property name="webapp.root" value="${basedir}/${webapp.name}"/>
+        </ant>
+    </target>
+
+    <target name="undeploy" description="Undeploy webapp">
+        <ant antfile="${runTomcat.xml}" target="undeploy" inheritAll="false">
+            <property name="catalina.username" value="manager"/>
+            <property name="catalina.password" value="manager"/>
+            <property name="context.path" value="${webapp.name}"/>
+        </ant>
+    </target>
+
+    <target name="redeploy" description="Redeploy webapp">
+        <ant antfile="${runTomcat.xml}" target="redeploy" inheritAll="false">
+            <property name="catalina.username" value="manager"/>
+            <property name="catalina.password" value="manager"/>
+            <property name="context.path" value="${webapp.name}"/>
+        </ant>
+    </target>
+
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for starting / stopping a server                         -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="start" description="Start server">
+        <ant antfile="${runTomcat.xml}" target="start" inheritAll="false"/>
+    </target>
+
+    <target name="stop" description="Stop server">
+        <ant antfile="${runTomcat.xml}" target="stop" inheritAll="false"/>
+    </target>
+
+    <!-- todo: this needs to compost down into runTomcat.xml; until we're sure it works, it stays here -->
+    <target name="ensure.deployed" description="Deploy webapp for the test recorder">
+        <echo>Ensuring that the webapp ${webapp.name} is deployed on a running server at the url ${webapp.waitfor.url}</echo>
+
+        <waitfor maxwait="5" maxwaitunit="second" timeoutproperty="unavailable">
+            <http url="${webapp.waitfor.url}"/>
+        </waitfor>
+        <antcall target="do.deploy"/>
+        <antcall target="do.redeploy"/>
+        <fail if="still.unavailable" message="Couldn't find webapp with path ${webapp.waitfor.url}"/>
+    </target>
+
+    <target name="do.deploy" if="unavailable">
+        <echo>Webapp is not deployed; deploying</echo>
+
+        <antcall target="deploy"/>
+        <echo>...deploy complete</echo>
+
+        <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+            <http url="${webapp.waitfor.url}"/>
+        </waitfor>
+    </target>
+
+    <target name="do.redeploy" unless="unavailable">
+        <echo>Webapp is deployed; undeploy and redeploy</echo>
+
+        <antcall target="undeploy"/>
+        <echo>...undeploy complete</echo>
+
+        <antcall target="deploy"/>
+        <echo>...deploy complete</echo>
+
+        <waitfor maxwait="120" maxwaitunit="second" timeoutproperty="still.unavailable">
+            <http url="${webapp.waitfor.url}"/>
+        </waitfor>
+    </target>
+
+</project>

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/src/global/Global.app
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/src/global/Global.app	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,34 @@
+package global;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.netui.pageflow.*;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/** 
+ * WARNING: This file is part of the test framework.  It is copied 
+ *          into this webapp at build time. Any changes you make to 
+ *          this file will be lost the next time you rebuild.  
+ *          DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+ */
+@Jpf.Controller(
+    catches={
+       @Jpf.Catch(type=java.lang.Exception.class, method="handleException")
+    }
+)
+public class Global extends GlobalApp
+{
+    @Jpf.ExceptionHandler(
+        forwards={
+            @Jpf.Forward(name=Report.RESULTS, path=Report.RESULTSJSP)
+        }
+    )
+    protected Forward handleException(Exception ex, String actionName, String message, Object form)
+    {
+        Report report = (Report)getRequest().getAttribute(Report.KEY);
+        
+        if (null == report)
+            report = new Report(Report.ABORT, "An Unexpected Exception Was Found", ex);
+        
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/web.xml
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/WEB-INF/web.xml	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+    version="2.4">
+
+    <display-name>Beehive Web Application</display-name>
+
+    <filter>
+        <filter-name>PageFlowJspFilter</filter-name>
+        <filter-class>org.apache.beehive.netui.pageflow.PageFlowJspFilter</filter-class>
+    </filter>
+
+    <filter-mapping>
+        <filter-name>PageFlowJspFilter</filter-name>
+        <url-pattern>*.jsp</url-pattern>
+        <dispatcher>FORWARD</dispatcher>
+    </filter-mapping>
+
+    <!-- Action Servlet Configuration (with debugging) -->
+    <servlet>
+        <servlet-name>action</servlet-name>
+        <servlet-class>org.apache.beehive.netui.pageflow.PageFlowActionServlet</servlet-class>
+        <init-param>
+            <param-name>config</param-name>
+            <param-value>/WEB-INF/.pageflow-struts-generated/jpf-struts-config.xml</param-value>
+        </init-param>
+        <init-param>
+            <param-name>config/-global</param-name>
+            <param-value>/WEB-INF/.pageflow-struts-generated/jpf-struts-config--global.xml</param-value>
+        </init-param>
+        <init-param>
+            <param-name>debug</param-name>
+            <param-value>2</param-value>
+        </init-param>
+        <init-param>
+            <param-name>detail</param-name>
+            <param-value>2</param-value>
+        </init-param>
+        <load-on-startup>2</load-on-startup>
+    </servlet>
+
+    <!-- Struts Action Servlet Mappings -->
+    <!-- Note that because Struts takes the *last* mapping here as the extension to add to
+         actions posted from forms, we must have *.do come after *.jpf. -->
+    <servlet-mapping>
+        <servlet-name>action</servlet-name>
+        <url-pattern>*.jpf</url-pattern>
+    </servlet-mapping>
+
+    <servlet-mapping>
+        <servlet-name>action</servlet-name>
+        <url-pattern>*.do</url-pattern>
+    </servlet-mapping>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+    </welcome-file-list>
+
+    <error-page>
+        <error-code>500</error-code>
+        <location>/error.jsp</location>
+    </error-page>
+
+    <jsp-config>
+        <!-- Define the NetUI tag library TLDs -->
+        <taglib>
+            <taglib-uri>beehive-netui-tags-html.tld</taglib-uri>
+            <taglib-location>/WEB-INF/beehive-netui-tags-html.tld</taglib-location>
+        </taglib>
+        <taglib>
+            <taglib-uri>beehive-netui-tags-databinding.tld</taglib-uri>
+            <taglib-location>/WEB-INF/beehive-netui-tags-databinding.tld</taglib-location>
+        </taglib>
+        <taglib>
+            <taglib-uri>beehive-netui-tags-template.tld</taglib-uri>
+            <taglib-location>/WEB-INF/beehive-netui-tags-template.tld</taglib-location>
+        </taglib>
+    </jsp-config>
+</web-app>

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/error.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/error.jsp	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+Error page of controlsPerfWeb,
+</body>
+</html>

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/index.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/index.jsp	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,7 @@
+<html>
+<head>
+</head>
+<body>
+Welcome to controlsPerfWeb, a web app to test beehive controls performance
+</body>
+</html>

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/dproxy/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/dproxy/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,103 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.benchmarks.strlen.dproxy;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import java.lang.reflect.Proxy;
+import org.apache.beehive.controls.perf.benchmarks.dproxy.IStrlen;
+import org.apache.beehive.controls.perf.benchmarks.dproxy.StrlenDProxy;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      log("TEST: StrlenDproxyJpfTest");
+      final int iterations = Constants.STRLEN_ITERATIONS;
+      PerfUtil util = new PerfUtil();
+      String input = util.createString(Constants.DEFAULT_STR_SIZE);
+      long cputime;
+      int hash = 0;
+
+      // instantiate the proxy to be used in the test
+      Class[] proxyInterfaces = new Class[]{IStrlen.class};
+      IStrlen strlen = (IStrlen) Proxy.newProxyInstance(IStrlen.class.getClassLoader(),
+                                                        proxyInterfaces,
+                                                        new StrlenDProxy());
+
+      // warm up the vm
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, strlen);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // run it again for the real measurement
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, strlen);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // log the results
+      log("hash="+hash);
+      log("time="+cputime);
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+
+  private int run(String p_input, IStrlen p_strlen)
+  {
+    return p_strlen.stringLength(p_input);
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javabean/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javabean/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,98 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.benchmarks.strlen.javabean;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+// netui
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import org.apache.beehive.controls.perf.benchmarks.javabean.StrlenBean;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      log("TEST: StrlenJavabeanJpfTest");
+      final int iterations = Constants.STRLEN_ITERATIONS;
+      PerfUtil util = new PerfUtil();
+      String input = util.createString(Constants.DEFAULT_STR_SIZE);
+      long cputime;
+      int hash = 0;
+
+      // instantiate the bean for the test
+      StrlenBean bean = new StrlenBean();
+
+      // warm up the vm
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, bean);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // run it again for the real measurement
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, bean);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // log the results
+      log("hash="+hash);
+      log("time="+cputime);
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+
+  private int run(String p_input, StrlenBean p_bean)
+  {
+    return p_bean.stringLength(p_input);
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,98 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.benchmarks.strlen.javaclass;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+// netui
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import org.apache.beehive.controls.perf.benchmarks.CStrlen;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      log("TEST: StrlenJavaclassJpfTest");
+      final int iterations = Constants.STRLEN_ITERATIONS;
+      PerfUtil util = new PerfUtil();
+      String input = util.createString(Constants.DEFAULT_STR_SIZE);
+      long cputime;
+      int hash = 0;
+
+      // instantiate the bean for the test
+      CStrlen strlen  = new CStrlen();
+
+      // warm up the vm
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, strlen);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // run it again for the real measurement
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, strlen);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // log the results
+      log("hash="+hash);
+      log("time="+cputime);
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+
+  private int run(String p_input, CStrlen p_strlen)
+  {
+    return p_strlen.stringLength(p_input);
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,99 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.benchmarks.strlen.methodinv;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+// netui
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import java.lang.reflect.Method;
+import org.apache.beehive.controls.perf.benchmarks.CStrlen;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      log("TEST: StrlenMethodinvJpfTest");
+      final int iterations = Constants.STRLEN_ITERATIONS;
+      PerfUtil util = new PerfUtil();
+      String input = util.createString(Constants.DEFAULT_STR_SIZE);
+      long cputime;
+      int hash = 0;
+
+      // instantiate the method to be used for the test
+      Method method = CStrlen.class.getMethod("stringLength",new Class[]{String.class});
+
+      // warm up the vm
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, method);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // run it again for the real measurement
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, method);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // log the results
+      log("hash="+hash);
+      log("time="+cputime);
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+  private int run(String p_input, Method p_method) throws Exception
+  {
+    Object oResult = p_method.invoke(CStrlen.class.newInstance(),(Object)p_input);
+    return ( (Integer)oResult ).intValue();
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,101 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.programmatic.strlen;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import org.apache.beehive.controls.perf.controls.custom.StrlenControlBean;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      // instantiate the control
+      StrlenControlBean control =(StrlenControlBean)java.beans.Beans.instantiate(
+          Thread.currentThread().getContextClassLoader(),
+					"org.apache.beehive.controls.perf.controls.custom.StrlenControlBean");
+
+      final int iterations = Constants.STRLEN_ITERATIONS;
+      PerfUtil util = new PerfUtil();
+      String input = util.createString(Constants.DEFAULT_STR_SIZE);
+
+      log("TEST: StrlenPgmJpfTest");
+      long cputime;
+      int hash = 0;
+
+      // warm up the vm
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, control);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // run it again for the real measurement
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, control);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // log the results
+      log("hash="+hash);
+      log("time="+cputime);
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+
+  private int run(String p_input, StrlenControlBean p_control)
+  {
+    return p_control.stringLength(p_input);
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,134 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.programmatic.varargs;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+// for netui
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+// milton
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import org.apache.beehive.controls.perf.controls.custom.VarargsControlBean;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      // instantiate the control programmatically
+      VarargsControlBean control =(VarargsControlBean)java.beans.Beans.instantiate(
+          Thread.currentThread().getContextClassLoader(),
+					"org.apache.beehive.controls.perf.controls.custom.VarargsControlBean");
+
+      final int iterations = Constants.VARARGS_ITERATIONS;
+      PerfUtil util = new PerfUtil();
+      int[] input = util.createIntArray(Constants.DEFAULT_VARARG_PARAMS[Constants.DEFAULT_VARARG_PARAMS.length-1]);
+
+      log("TEST: VarargsPgmJpfTest");  
+      long cputime;
+      int hash = 0;
+
+      // warm up the vm with the largest array input
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input, control);
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // loop through the various sizes for the inputed int array
+      int sum = 0;
+      long duration = 0;
+      cputime = 0;
+      for(int j=0; j<Constants.DEFAULT_VARARG_PARAMS.length; j++)
+      {
+        input = util.createIntArray(Constants.DEFAULT_VARARG_PARAMS[j]);
+        sum = 0;
+        // run it for the measurement
+        duration = System.currentTimeMillis();
+        for(int i=0; i<iterations; i++){
+          hash += run(input, control);
+        }
+        duration = System.currentTimeMillis() - duration;
+
+        // log the results for this input
+        log("array size="+input.length);
+        log("expected sum="+expectedSum(input));
+        log("actual sum="+sum);
+        log("duration="+duration);
+
+        // update the overall result
+        hash += sum;
+        cputime += duration;
+      }
+
+      // log the overall result
+      log("hash="+hash);
+      log("time="+cputime);
+
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+
+  private int run(int[] p_input, VarargsControlBean p_control)
+  {
+    return p_control.getIntSum(p_input);
+  }
+
+  private static int expectedSum(int[] p_intArray)
+  {
+    int result = 0;
+    for(int i : p_intArray)
+    {
+      result += i;
+    }
+
+    result = Constants.VARARGS_ITERATIONS*result;
+    return result;
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,118 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.programmatic.varret;
+
+// for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+// for netui
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+// milton
+import org.apache.beehive.test.tools.milton.common.Report;
+// perf imports
+import org.apache.beehive.controls.perf.controls.custom.VarretControlBean;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  private Report _report = new Report();
+  private static Logger logger = Logger.getRootLogger();
+
+  @Jpf.Action()
+  protected Forward begin()
+  {
+    BasicConfigurator.configure();
+		try
+		{
+      // instantiate the control programmatically
+      VarretControlBean control =(VarretControlBean)java.beans.Beans.instantiate(
+          Thread.currentThread().getContextClassLoader(),
+					"org.apache.beehive.controls.perf.controls.custom.VarretControlBean");
+
+      final int iterations = Constants.VARRET_ITERATIONS;
+      int[] input = Constants.DEFAULT_VARRET_PARAMS;
+
+      log("TEST: VarretPgmJpfTest");  
+      long cputime;
+      int hash = 0;
+
+      // warm up the vm with the largest array input
+      cputime = System.currentTimeMillis();
+      for(int i=0; i<iterations; i++){
+        hash += run(input[input.length-1], control).length();
+      }
+      cputime = System.currentTimeMillis() - cputime;
+
+      // loop through the various sizes for the inputed int
+      long duration = 0;
+      int length = 0;
+      cputime = 0;
+      for(int j=0; j<Constants.DEFAULT_VARRET_PARAMS.length; j++)
+      {
+        length = 0;
+        // run it for the measurement
+        duration = System.currentTimeMillis();
+        for(int i=0; i<iterations; i++){
+          length += run(input[j], control).length();
+        }
+        duration = System.currentTimeMillis() - duration;
+
+        // log the results for this input
+        log("int input="+input[j]);
+        log("length sum="+length);
+        log("duration="+duration+"\n");
+
+        // update the overall result
+        hash += length;
+        cputime += duration;
+      }
+
+      log("hash="+hash);
+      log("time="+cputime);
+
+			_report.setStatus(Report.PASS);
+	  }
+	  catch(Exception e)
+		{
+			_report.setStatus(Report.FAIL);
+			_report.setExceptionStack(e);
+	 	}
+
+    return new Forward(Report.RESULTS, Report.KEY, _report);
+  }
+
+
+  private String run(int p_input, VarretControlBean p_control)
+  {
+    return (p_control.createString(p_input));
+  }
+
+  private void log(String message)
+  {
+    logger.info("PERF "+message);
+    _report.addMessage(message);
+  }
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,51 @@
+/*
+ *
+ * N E T U I
+ *
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package jpf.test.controls.performance.test;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+//import org.apache.beehive.controls.api.bean.Control;
+//import org.apache.beehive.controls.api.bean.ControlBean;
+//import test.controls.custom.StrlenControlBean;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Instantiate a custom control programmatically*/
+
+@Jpf.Controller(
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Test extends PageFlowController
+{
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin()
+		{
+    	Report report=new Report();
+      report.setStatus(Report.PASS);
+      report.setMessage("pass from page flow");
+ 			return new Forward(Report.RESULTS, Report.KEY, report);
+		}
+}

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/beehive/version1/images/error-header.jpg
==============================================================================
Binary file. No diff available.

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/miltonResults.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/miltonResults.jsp	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,14 @@
+<!-- WARNING: This file is part of the test framework.  It is copied 
+              into this webapp at build time. Any changes you make to 
+              this file will be lost the next time you rebuild.  
+              DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+    <head>
+        <title>Milton Test Results</title>
+    </head>
+    <body>
+        <jsp:include page="miltonResultsTemplate.jsp" />
+    </body>
+</html>

Added: incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/miltonResultsTemplate.jsp
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/resources/milton/jsp/miltonResultsTemplate.jsp	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,23 @@
+<!-- WARNING: This file is part of the test framework.  It is copied 
+              into this webapp at build time. Any changes you make to 
+              this file will be lost the next time you rebuild.  
+              DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+
+<%@ page import="org.apache.beehive.test.tools.milton.common.Report"%>
+<%@ page import="org.apache.beehive.netui.pageflow.PageFlowUtils"%>
+
+  <% Report report = (Report)PageFlowUtils.getPageInput(Report.KEY,request);%>
+
+<table border="1" id="<% out.print(Report.RESULT_TABLE_ID); %>">
+    <tr>
+        <td id="<% out.print(Report.STATUS_ID); %>"><% out.print(report.getStatus()); %></td>
+    </tr>
+    <tr>
+        <td id="<% out.print(Report.MESSAGE_ID); %>"><% out.print(report.getMessage()); %></td>
+    </tr>
+    <tr>
+        <td id="<% out.print(Report.EXCEPTION_ID); %>"><% out.print(report.getExceptionStack()); %></td>
+    </tr>
+</table>

Modified: incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/everything-suite.xsd
==============================================================================
--- incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/everything-suite.xsd	(original)
+++ incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/everything-suite.xsd	Mon Nov 15 13:50:30 2004
@@ -1,4 +1,8 @@
 <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+	<!-- performance test suite schema -->
+	<xs:include schemaLocation="performance/controls-perf.xsd"/>
+	
   <xs:complexType name="configuration-dependencyType">
     <xs:simpleContent>
       <xs:extension base="xs:string">
@@ -304,6 +308,11 @@
           maxOccurs="1"
           name="junit"
           type="javatestType"
+        />
+        <xs:element
+          maxOccurs="1"
+          name="controlsperf"
+          type="controlsPerfType"
         />
         <xs:element name="wstest" type="webServerType"/>
         <xs:element name="tch-diff-test" type="tchtestType"/>

Added: incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/performance/controls-perf.xsd
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/tools/tch/deploy/schema/performance/controls-perf.xsd	Mon Nov 15 13:50:30 2004
@@ -0,0 +1,52 @@
+<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+  <xs:complexType name="stringType">
+    <xs:simpleContent>
+      <xs:extension base="xs:string"/>
+    </xs:simpleContent>
+  </xs:complexType>
+
+	<xs:complexType name="controlsPerfType">
+    <xs:choice maxOccurs="unbounded">
+			<xs:choice maxOccurs="1">
+     		<xs:element
+       	 maxOccurs="1"
+       	 minOccurs="1"
+       	 name="cmdline"
+       	 type="stringType"
+    	  />
+     		<xs:element
+       	 maxOccurs="1"
+       	 minOccurs="1"
+       	 name="url"
+       	 type="stringType"
+    	  />
+			</xs:choice>
+      <xs:element
+        maxOccurs="1"
+        minOccurs="1"
+        name="hash"
+        type="stringType"
+      />
+      <xs:element
+        maxOccurs="1"
+        minOccurs="1"
+        name="bar"
+        type="stringType"
+      />
+      <xs:element
+        maxOccurs="1"
+        minOccurs="1"
+        name="drift"
+        type="xs:decimal"
+      />
+      <xs:element
+        maxOccurs="1"
+        minOccurs="1"
+        name="timeout"
+        type="stringType"
+      />
+		</xs:choice>
+	</xs:complexType>
+
+</xs:schema>

Modified: incubator/beehive/trunk/controls/test/tools/tch/deploy/setenv.sh
==============================================================================
--- incubator/beehive/trunk/controls/test/tools/tch/deploy/setenv.sh	(original)
+++ incubator/beehive/trunk/controls/test/tools/tch/deploy/setenv.sh	Mon Nov 15 13:50:30 2004
@@ -1,54 +1,54 @@
-#!/bin/sh
-
-PATHSEP=":"
-myos=`uname`
-case "$myos" in
-  Window*)
-  PATHSEP=";"
-  ;;
-esac
-
-echo ""
-
-TCH_HOME=`pwd`
-cd ${TCH_HOME}/..
-TCH_LIB=`pwd`
-cd ${TCH_HOME}
-ANT_HOME=${ANT_HOME:-${BEEHIVE_HOME}/installed/apache-ant-1.6.1}
-EXTERNAL_DIR=${BEEHIVE_HOME}/external
-
-echo Adding $TCH_HOME to PATH
-PATH="${TCH_HOME}${PATHSEP}$PATH"
-export PATH
-
-echo Adding $TCH_LIB to PATH
-PATH="${TCH_LIB}${PATHSEP}$PATH"
-export PATH
-
-TCH_JAR=${TCH_HOME}/tchx.jar
-echo Adding $TCH_JAR to CLASSPATH
-CLASSPATH="${TCH_JAR}${PATHSEP}$CLASSPATH"
-
-ANT_JAR=${ANT_JAR:-$ANT_HOME/lib/ant.jar}
-echo Adding ${ANT_JAR} to CLASSPATH
-CLASSPATH="${ANT_JAR}${PATHSEP}${CLASSPATH}"
-
-XBEAN_JAR=${TCH_HOME}/../3rdparty/xbean-1.0.2.jar
-echo Adding ${XBEAN_JAR} to CLASSPATH 
-CLASSPATH="${XBEAN_JAR}${PATHSEP}${CLASSPATH}"
-
-SCHEMA_JAR=${TCH_HOME}/schema.jar
-echo Adding ${SCHEMA_JAR} to CLASSPATH 
-CLASSPATH="${SCHEMA_JAR}${PATHSEP}${CLASSPATH}"
-
-export CLASSPATH
-export TCH_HOME
-export BUILDDIR
-
-unset TCH_JAR
-unset XERCES_JAR
-unset ANT_JAR
-unset TCH_LIB
-
-echo ""
-
+#!/bin/sh
+
+PATHSEP=":"
+myos=`uname`
+case "$myos" in
+  Window*)
+  PATHSEP=";"
+  ;;
+esac
+
+echo ""
+
+TCH_HOME=`pwd`
+cd ${TCH_HOME}/..
+TCH_LIB=`pwd`
+cd ${TCH_HOME}
+ANT_HOME=${ANT_HOME:-${BEEHIVE_HOME}/installed/apache-ant-1.6.1}
+EXTERNAL_DIR=${BEEHIVE_HOME}/external
+
+echo Adding $TCH_HOME to PATH
+PATH="${TCH_HOME}${PATHSEP}$PATH"
+export PATH
+
+echo Adding $TCH_LIB to PATH
+PATH="${TCH_LIB}${PATHSEP}$PATH"
+export PATH
+
+TCH_JAR=${TCH_HOME}/tchx.jar
+echo Adding $TCH_JAR to CLASSPATH
+CLASSPATH="${TCH_JAR}${PATHSEP}$CLASSPATH"
+
+ANT_JAR=${ANT_JAR:-$ANT_HOME/lib/ant.jar}
+echo Adding ${ANT_JAR} to CLASSPATH
+CLASSPATH="${ANT_JAR}${PATHSEP}${CLASSPATH}"
+
+XBEAN_JAR=${TCH_HOME}/../3rdparty/xbean-1.0.2.jar
+echo Adding ${XBEAN_JAR} to CLASSPATH 
+CLASSPATH="${XBEAN_JAR}${PATHSEP}${CLASSPATH}"
+
+SCHEMA_JAR=${TCH_HOME}/schema.jar
+echo Adding ${SCHEMA_JAR} to CLASSPATH 
+CLASSPATH="${SCHEMA_JAR}${PATHSEP}${CLASSPATH}"
+
+export CLASSPATH
+export TCH_HOME
+export BUILDDIR
+
+unset TCH_JAR
+unset XERCES_JAR
+unset ANT_JAR
+unset TCH_LIB
+
+echo ""
+

Modified: incubator/beehive/trunk/controls/test/tools/tch/setenv.sh
==============================================================================
--- incubator/beehive/trunk/controls/test/tools/tch/setenv.sh	(original)
+++ incubator/beehive/trunk/controls/test/tools/tch/setenv.sh	Mon Nov 15 13:50:30 2004
@@ -1,96 +1,96 @@
-#!/bin/sh
-
-TCH_HOME=`pwd`
-export TCH_HOME
-
-TCH_SRC="${TCH_HOME}/src"
-export TCH_SRC
-
-echo "$TCH_HOME"
-
-# read version file, will be used when generating tch.version
-TCH_VERSION=`cat version`
-echo "version: ${TCH_VERSION}"
-export TCH_VERSION
-
-# should probably provide a default
-JAVA_HOME=${JAVA_HOME:-$JAVAHOME}
-
-
-EXTERNAL_DIR=${BEEHIVE_HOME}/external
-ANT_HOME=${ANT_HOME:-${BEEHIVE_HOME}/installed/apache-ant-1.6.1}
-ANT_JAR=${ANT_JAR:-$ANT_HOME/lib/ant.jar}
-ANT_LAUNCHER_JAR=${ANT_LAUNCHER_JAR:-$ANT_HOME/lib/ant-launcher.jar}
-JUNIT_JAR=${JUNIT_JAR:-${EXTERNAL_DIR}/junit/junit.jar}
-#XERCES_JAR=${EXTERNAL_DIR}/xerces/xerces-1.4.4.jar
-CRIMSON_JAR=${EXTERNAL_DIR}/crimson/crimson-1.1.jar
-JAKARTA_JAR=${EXTERNAL_DIR}/jakarta/jakarta-regexp-1.2.jar
-JAXP_JAR=${EXTERNAL_DIR}/jaxp/jaxp.jar
-
-PATHSEP=":"
-myos=`uname`
-case "$myos" in
-  Window*)
-  PATHSEP=";"
-  ;;
-esac
-
-
-cd ${TCH_HOME}/3rdparty
-THIRDPARTY_DIR=`pwd`
-for A in \
-j2ee12.jar \
-xbean-1.0.2.jar
-do
-  echo "Adding ${THIRDPARTY_DIR}/$A to CLASSPATH"
-  CLASSPATH="${THIRDPARTY_DIR}/$A${PATHSEP}$CLASSPATH"
-done
-echo ""
-cd $TCH_HOME
-
-
-echo "Adding ${JUNIT_JAR} to CLASSPATH"
-CLASSPATH="${JUNIT_JAR}${PATHSEP}$CLASSPATH"
-
-echo "Adding ${ANT_JAR} to CLASSPATH"
-CLASSPATH="${ANT_JAR}${PATHSEP}$CLASSPATH"
-
-echo "Adding ${ANT_LAUNCHER_JAR} to CLASSPATH"
-CLASSPATH="${ANT_LAUNCHER_JAR}${PATHSEP}$CLASSPATH"
-
-#echo "Adding ${XERCES_JAR} to CLASSPATH"
-#CLASSPATH="${XERCES_JAR}${PATHSEP}$CLASSPATH"
-
-echo "Adding ${CRIMSON_JAR} to CLASSPATH"
-CLASSPATH="${CRIMSON_JAR}${PATHSEP}$CLASSPATH"
-
-echo "Adding ${JAKARTA_JAR} to CLASSPATH"
-CLASSPATH="${JAKARTA_JAR}${PATHSEP}$CLASSPATH"
-
-echo "Adding ${JAXP_JAR} to CLASSPATH"
-CLASSPATH="${JAXP_JAR}${PATHSEP}$CLASSPATH"
-
-
-
-
-
-echo "Adding $JAVA_HOME/lib/tools.jar to CLASSPATH"
-CLASSPATH="$JAVA_HOME/lib/tools.jar${PATHSEP}$CLASSPATH"
-echo ""
-
-export CLASSPATH
-
-echo "Adding ${JAVA_HOME}/bin to PATH"
-PATH="$JAVA_HOME/bin/${PATHSEP}$PATH"
-ANT_SCRIPT="${TCH_HOME}/"
-echo "Adding ${ANT_SCRIPT} to PATH"
-PATH="${ANT_SCRIPT}${PATHSEP}$PATH"
-
-rm -f $TCH_HOME/buildenv.properties
-echo TCH_HOME=${TCH_HOME} >> $TCH_HOME/buildenv.properties
-echo >> $TCH_HOME/buildenv.properties
-echo optimize=false >> $TCH_HOME/buildenv.properties
-echo debug=true >> $TCH_HOME/buildenv.properties
-
-unset TCH_HOME optimize debug ANT_SCRIPT
-echo ""
+#!/bin/sh
+
+TCH_HOME=`pwd`
+export TCH_HOME
+
+TCH_SRC="${TCH_HOME}/src"
+export TCH_SRC
+
+echo "$TCH_HOME"
+
+# read version file, will be used when generating tch.version
+TCH_VERSION=`cat version`
+echo "version: ${TCH_VERSION}"
+export TCH_VERSION
+
+# should probably provide a default
+JAVA_HOME=${JAVA_HOME:-$JAVAHOME}
+
+
+EXTERNAL_DIR=${BEEHIVE_HOME}/external
+ANT_HOME=${ANT_HOME:-${BEEHIVE_HOME}/installed/apache-ant-1.6.1}
+ANT_JAR=${ANT_JAR:-$ANT_HOME/lib/ant.jar}
+ANT_LAUNCHER_JAR=${ANT_LAUNCHER_JAR:-$ANT_HOME/lib/ant-launcher.jar}
+JUNIT_JAR=${JUNIT_JAR:-${EXTERNAL_DIR}/junit/junit.jar}
+#XERCES_JAR=${EXTERNAL_DIR}/xerces/xerces-1.4.4.jar
+CRIMSON_JAR=${EXTERNAL_DIR}/crimson/crimson-1.1.jar
+JAKARTA_JAR=${EXTERNAL_DIR}/jakarta/jakarta-regexp-1.2.jar
+JAXP_JAR=${EXTERNAL_DIR}/jaxp/jaxp.jar
+
+PATHSEP=":"
+myos=`uname`
+case "$myos" in
+  Window*)
+  PATHSEP=";"
+  ;;
+esac
+
+
+cd ${TCH_HOME}/3rdparty
+THIRDPARTY_DIR=`pwd`
+for A in \
+j2ee12.jar \
+xbean-1.0.2.jar
+do
+  echo "Adding ${THIRDPARTY_DIR}/$A to CLASSPATH"
+  CLASSPATH="${THIRDPARTY_DIR}/$A${PATHSEP}$CLASSPATH"
+done
+echo ""
+cd $TCH_HOME
+
+
+echo "Adding ${JUNIT_JAR} to CLASSPATH"
+CLASSPATH="${JUNIT_JAR}${PATHSEP}$CLASSPATH"
+
+echo "Adding ${ANT_JAR} to CLASSPATH"
+CLASSPATH="${ANT_JAR}${PATHSEP}$CLASSPATH"
+
+echo "Adding ${ANT_LAUNCHER_JAR} to CLASSPATH"
+CLASSPATH="${ANT_LAUNCHER_JAR}${PATHSEP}$CLASSPATH"
+
+#echo "Adding ${XERCES_JAR} to CLASSPATH"
+#CLASSPATH="${XERCES_JAR}${PATHSEP}$CLASSPATH"
+
+echo "Adding ${CRIMSON_JAR} to CLASSPATH"
+CLASSPATH="${CRIMSON_JAR}${PATHSEP}$CLASSPATH"
+
+echo "Adding ${JAKARTA_JAR} to CLASSPATH"
+CLASSPATH="${JAKARTA_JAR}${PATHSEP}$CLASSPATH"
+
+echo "Adding ${JAXP_JAR} to CLASSPATH"
+CLASSPATH="${JAXP_JAR}${PATHSEP}$CLASSPATH"
+
+
+
+
+
+echo "Adding $JAVA_HOME/lib/tools.jar to CLASSPATH"
+CLASSPATH="$JAVA_HOME/lib/tools.jar${PATHSEP}$CLASSPATH"
+echo ""
+
+export CLASSPATH
+
+echo "Adding ${JAVA_HOME}/bin to PATH"
+PATH="$JAVA_HOME/bin/${PATHSEP}$PATH"
+ANT_SCRIPT="${TCH_HOME}/"
+echo "Adding ${ANT_SCRIPT} to PATH"
+PATH="${ANT_SCRIPT}${PATHSEP}$PATH"
+
+rm -f $TCH_HOME/buildenv.properties
+echo TCH_HOME=${TCH_HOME} >> $TCH_HOME/buildenv.properties
+echo >> $TCH_HOME/buildenv.properties
+echo optimize=false >> $TCH_HOME/buildenv.properties
+echo debug=true >> $TCH_HOME/buildenv.properties
+
+unset TCH_HOME optimize debug ANT_SCRIPT
+echo ""