You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/08/12 17:23:08 UTC
svn commit: r232310 [8/92] - in /beehive/trunk/controls/test: common/
infra/gtlf/ infra/gtlf/xsl/ infra/mantis/ infra/tch/ infra/tch/messages/
infra/tch/runtime/ infra/tch/schema/ perf/ perf/bin/ perf/cases/
perf/ctlsrc/org/apache/beehive/controls/perf...
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,98 +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 transient 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);
- }
- logger = null;
- 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);
- }
-}
+/*
+ *
+ * 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 transient 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);
+ }
+ logger = null;
+ 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);
+ }
+}
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/javaclass/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,100 +1,100 @@
-/*
- *
- * 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 transient 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);
- }
-
- logger = null;
- 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);
- }
- }
+/*
+ *
+ * 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 transient 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);
+ }
+
+ logger = null;
+ 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);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/benchmarks/strlen/methodinv/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlen/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlen/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlen/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlen/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,108 +1,108 @@
-/*
- *
- * 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.declarative.strlen;
-
-// logging
-import org.apache.log4j.Logger;
-import org.apache.log4j.Level;
-import org.apache.log4j.BasicConfigurator;
-
-// controls framework
-import org.apache.beehive.controls.api.bean.Control;
-
-// netui
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
-// test tools
-import org.apache.beehive.test.tools.milton.common.Report;
-import org.apache.beehive.controls.perf.utils.Constants;
-import org.apache.beehive.controls.perf.utils.PerfUtil;
-
-// control used in scenario
-import org.apache.beehive.controls.perf.controls.custom.StrlenControlBean;
-
-@Jpf.Controller(
- forwards = {
- @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP)
- })
-public class Controller extends PageFlowController
-{
- // declare the control - instantiated by controls framework
- @Control
- public StrlenControlBean control;
-
- private Report _report = new Report();
- private transient Logger logger = Logger.getRootLogger();
-
- @Jpf.Action()
- protected Forward begin()
- {
- BasicConfigurator.configure();
- try
- {
- final int iterations = Constants.STRLEN_ITERATIONS;
- PerfUtil util = new PerfUtil();
- String input = util.createString(Constants.DEFAULT_STR_SIZE);
-
- log("TEST: StrlenDclJpfTest");
- 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);
- }
-
- logger = null;
- 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);
- }
- }
+/*
+ *
+ * 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.declarative.strlen;
+
+// logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+
+// controls framework
+import org.apache.beehive.controls.api.bean.Control;
+
+// netui
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+// test tools
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.controls.perf.utils.Constants;
+import org.apache.beehive.controls.perf.utils.PerfUtil;
+
+// control used in scenario
+import org.apache.beehive.controls.perf.controls.custom.StrlenControlBean;
+
+@Jpf.Controller(
+ forwards = {
+ @Jpf.Forward(name=Report.RESULTS, path = Report.RESULTSJSP)
+ })
+public class Controller extends PageFlowController
+{
+ // declare the control - instantiated by controls framework
+ @Control
+ public StrlenControlBean control;
+
+ private Report _report = new Report();
+ private transient Logger logger = Logger.getRootLogger();
+
+ @Jpf.Action()
+ protected Forward begin()
+ {
+ BasicConfigurator.configure();
+ try
+ {
+ final int iterations = Constants.STRLEN_ITERATIONS;
+ PerfUtil util = new PerfUtil();
+ String input = util.createString(Constants.DEFAULT_STR_SIZE);
+
+ log("TEST: StrlenDclJpfTest");
+ 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);
+ }
+
+ logger = null;
+ 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);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlen/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlenST/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlenST/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlenST/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlenST/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,106 +1,106 @@
-/*
- *
- * 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.declarative.strlenST;
-
-//for logging
-import org.apache.log4j.Logger;
-import org.apache.log4j.Level;
-import org.apache.log4j.BasicConfigurator;
-
-//controls framework
-import org.apache.beehive.controls.api.bean.Control;
-
-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.StrlenControlSTBean;
-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
-{
-
- // declare the control - instantiated by controls framework
- @Control
- public StrlenControlSTBean control;
-
- private Report _report = new Report();
- private transient Logger logger = Logger.getRootLogger();
-
- @Jpf.Action()
- protected Forward begin()
- {
- BasicConfigurator.configure();
- try
- {
-
- final int iterations = Constants.STRLEN_ITERATIONS;
- PerfUtil util = new PerfUtil();
- String input = util.createString(Constants.DEFAULT_STR_SIZE);
-
- log("TEST: StrlenSTDclJpfTest");
- 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);
- }
-
- logger = null;
- return new Forward(Report.RESULTS, Report.KEY, _report);
- }
-
-
- private int run(String p_input, StrlenControlSTBean p_control)
- {
- return p_control.stringLength(p_input);
- }
-
- private void log(String message)
- {
- logger.info("PERF "+message);
- _report.addMessage(message);
- }
- }
+/*
+ *
+ * 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.declarative.strlenST;
+
+//for logging
+import org.apache.log4j.Logger;
+import org.apache.log4j.Level;
+import org.apache.log4j.BasicConfigurator;
+
+//controls framework
+import org.apache.beehive.controls.api.bean.Control;
+
+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.StrlenControlSTBean;
+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
+{
+
+ // declare the control - instantiated by controls framework
+ @Control
+ public StrlenControlSTBean control;
+
+ private Report _report = new Report();
+ private transient Logger logger = Logger.getRootLogger();
+
+ @Jpf.Action()
+ protected Forward begin()
+ {
+ BasicConfigurator.configure();
+ try
+ {
+
+ final int iterations = Constants.STRLEN_ITERATIONS;
+ PerfUtil util = new PerfUtil();
+ String input = util.createString(Constants.DEFAULT_STR_SIZE);
+
+ log("TEST: StrlenSTDclJpfTest");
+ 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);
+ }
+
+ logger = null;
+ return new Forward(Report.RESULTS, Report.KEY, _report);
+ }
+
+
+ private int run(String p_input, StrlenControlSTBean p_control)
+ {
+ return p_control.stringLength(p_input);
+ }
+
+ private void log(String message)
+ {
+ logger.info("PERF "+message);
+ _report.addMessage(message);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/declarative/strlenST/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,102 +1,102 @@
-/*
- *
- * 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 transient 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);
- }
-
- logger = null;
- 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);
- }
- }
+/*
+ *
+ * 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 transient 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);
+ }
+
+ logger = null;
+ 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);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlen/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenEvent/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenEvent/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenEvent/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenEvent/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,106 +1,106 @@
-/*
- *
- * 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.strlenEvent;
-
-//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.StrlenEventControlBean;
-import org.apache.beehive.controls.perf.controls.custom.StrlenEventControlListener;
-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 transient Logger logger = Logger.getRootLogger();
-
- @Jpf.Action()
- protected Forward begin()
- {
- BasicConfigurator.configure();
- try
- {
- // instantiate the control
- StrlenEventControlBean control =(StrlenEventControlBean)java.beans.Beans.instantiate(
- Thread.currentThread().getContextClassLoader(),
- "org.apache.beehive.controls.perf.controls.custom.StrlenEventControlBean");
- StrlenEventControlListener listener = new StrlenEventControlListener();
- control.addEventSet0Listener(listener);
-
- final int iterations = Constants.STRLEN_ITERATIONS;
- PerfUtil util = new PerfUtil();
- String input = util.createString(Constants.DEFAULT_STR_SIZE);
-
- log("TEST: StrlenEventPgmJpfTest");
- long cputime;
- int hash = 0;
-
- // warm up the vm
- cputime = System.currentTimeMillis();
- for(int i=0; i<iterations; i++){
- hash += run(input, control, listener);
- }
- 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, listener);
- }
- 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);
- }
-
- logger = null;
- return new Forward(Report.RESULTS, Report.KEY, _report);
- }
-
-
- private int run(String p_input, StrlenEventControlBean p_control, StrlenEventControlListener p_listener)
- {
- p_control.stringLength(p_input);
- return p_listener.getLength();
- }
-
- private void log(String message)
- {
- logger.info("PERF "+message);
- _report.addMessage(message);
- }
- }
+/*
+ *
+ * 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.strlenEvent;
+
+//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.StrlenEventControlBean;
+import org.apache.beehive.controls.perf.controls.custom.StrlenEventControlListener;
+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 transient Logger logger = Logger.getRootLogger();
+
+ @Jpf.Action()
+ protected Forward begin()
+ {
+ BasicConfigurator.configure();
+ try
+ {
+ // instantiate the control
+ StrlenEventControlBean control =(StrlenEventControlBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader(),
+ "org.apache.beehive.controls.perf.controls.custom.StrlenEventControlBean");
+ StrlenEventControlListener listener = new StrlenEventControlListener();
+ control.addEventSet0Listener(listener);
+
+ final int iterations = Constants.STRLEN_ITERATIONS;
+ PerfUtil util = new PerfUtil();
+ String input = util.createString(Constants.DEFAULT_STR_SIZE);
+
+ log("TEST: StrlenEventPgmJpfTest");
+ long cputime;
+ int hash = 0;
+
+ // warm up the vm
+ cputime = System.currentTimeMillis();
+ for(int i=0; i<iterations; i++){
+ hash += run(input, control, listener);
+ }
+ 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, listener);
+ }
+ 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);
+ }
+
+ logger = null;
+ return new Forward(Report.RESULTS, Report.KEY, _report);
+ }
+
+
+ private int run(String p_input, StrlenEventControlBean p_control, StrlenEventControlListener p_listener)
+ {
+ p_control.stringLength(p_input);
+ return p_listener.getLength();
+ }
+
+ private void log(String message)
+ {
+ logger.info("PERF "+message);
+ _report.addMessage(message);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenEvent/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenST/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenST/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenST/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenST/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,102 +1,102 @@
-/*
- *
- * 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.strlenST;
-
-//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.StrlenControlSTBean;
-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 transient Logger logger = Logger.getRootLogger();
-
- @Jpf.Action()
- protected Forward begin()
- {
- BasicConfigurator.configure();
- try
- {
- // instantiate the control
- StrlenControlSTBean control =(StrlenControlSTBean)java.beans.Beans.instantiate(
- Thread.currentThread().getContextClassLoader(),
- "org.apache.beehive.controls.perf.controls.custom.StrlenControlSTBean");
-
- final int iterations = Constants.STRLEN_ITERATIONS;
- PerfUtil util = new PerfUtil();
- String input = util.createString(Constants.DEFAULT_STR_SIZE);
-
- log("TEST: StrlenSTPgmJpfTest");
- 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);
- }
-
- logger = null;
- return new Forward(Report.RESULTS, Report.KEY, _report);
- }
-
-
- private int run(String p_input, StrlenControlSTBean p_control)
- {
- return p_control.stringLength(p_input);
- }
-
- private void log(String message)
- {
- logger.info("PERF "+message);
- _report.addMessage(message);
- }
- }
+/*
+ *
+ * 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.strlenST;
+
+//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.StrlenControlSTBean;
+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 transient Logger logger = Logger.getRootLogger();
+
+ @Jpf.Action()
+ protected Forward begin()
+ {
+ BasicConfigurator.configure();
+ try
+ {
+ // instantiate the control
+ StrlenControlSTBean control =(StrlenControlSTBean)java.beans.Beans.instantiate(
+ Thread.currentThread().getContextClassLoader(),
+ "org.apache.beehive.controls.perf.controls.custom.StrlenControlSTBean");
+
+ final int iterations = Constants.STRLEN_ITERATIONS;
+ PerfUtil util = new PerfUtil();
+ String input = util.createString(Constants.DEFAULT_STR_SIZE);
+
+ log("TEST: StrlenSTPgmJpfTest");
+ 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);
+ }
+
+ logger = null;
+ return new Forward(Report.RESULTS, Report.KEY, _report);
+ }
+
+
+ private int run(String p_input, StrlenControlSTBean p_control)
+ {
+ return p_control.stringLength(p_input);
+ }
+
+ private void log(String message)
+ {
+ logger.info("PERF "+message);
+ _report.addMessage(message);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/strlenST/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,139 +1,139 @@
-/*
- *
- * 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 transient 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"+j+":"+input.length);
- log("expected_sum"+j+":"+expectedSum(input));
- log("actual_sum"+j+":"+sum);
- log("duration"+j+":"+duration+" ");
-
- // The below uses the = sign so it can be plotted as a custom
- // datapoint in reportWeb
- log(input.length+"="+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);
- }
-
- logger = null;
- 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);
- }
- }
+/*
+ *
+ * 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 transient 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"+j+":"+input.length);
+ log("expected_sum"+j+":"+expectedSum(input));
+ log("actual_sum"+j+":"+sum);
+ log("duration"+j+":"+duration+" ");
+
+ // The below uses the = sign so it can be plotted as a custom
+ // datapoint in reportWeb
+ log(input.length+"="+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);
+ }
+
+ logger = null;
+ 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);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varargs/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf Fri Aug 12 08:12:28 2005
@@ -1,122 +1,122 @@
-/*
- *
- * 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 transient 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"+j+":"+input[j]);
- log("length_sum"+j+":"+length);
- log("duration"+j+":"+duration+" ");
-
- // The below uses the = sign so it can be plotted as a custom
- // datapoint in reportWeb
- log(input[j]+"="+duration+" ");
-
- // 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);
- }
- logger = null;
- 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);
- }
- }
+/*
+ *
+ * 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 transient 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"+j+":"+input[j]);
+ log("length_sum"+j+":"+length);
+ log("duration"+j+":"+duration+" ");
+
+ // The below uses the = sign so it can be plotted as a custom
+ // datapoint in reportWeb
+ log(input[j]+"="+duration+" ");
+
+ // 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);
+ }
+ logger = null;
+ 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);
+ }
+ }
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/programmatic/varret/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf (original)
+++ beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf Fri Aug 12 08:12:28 2005
@@ -1,51 +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);
- }
-}
+/*
+ *
+ * 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);
+ }
+}
Propchange: beehive/trunk/controls/test/perf/webapps/controlsPerfWeb/jpf/test/controls/performance/test/Test.jpf
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/forms/ReportForm.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/forms/SeriesForm.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/forms/SnapshotForm.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/HistoryProducer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/ProducerUtil.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/ProducerUtil.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/ProducerUtil.java (original)
+++ beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/ProducerUtil.java Fri Aug 12 08:12:28 2005
@@ -1,54 +1,54 @@
-package graphing;
-
-import java.util.HashMap;
-
-import org.openuri.perf.Custom;
-import org.openuri.perf.Result;
-import org.openuri.perf.ResultSetDocument;
-
-public class ProducerUtil
-{
-
- public static HashMap<Long,String> getFullnamesById(String p_regex, ResultSetDocument.ResultSet p_resultset)
- {
-
- Result[] results = p_resultset.getResultArray();
- HashMap<Long,String> names = new HashMap<Long,String>();
- for(int i=0; i<results.length; i++)
- {
- String name = results[i].getName();
- Long id = results[i].getId();
- Custom[] customs = results[i].getCustomArray();
-
- if(customs.length > 0)
- {
- for(int j=0; j<customs.length; j++)
- {
- name = name+"["+customs[j].getName()+"="+customs[j].getValue()+"]";
- }
- }
-
- if(name.matches(p_regex))
- {
- names.put(id,name);
- }
- }
- return names;
- }
-
-
- public static String getCustomValue(String p_name, Result p_result)
- {
- Custom[] customs = p_result.getCustomArray();
- for(int i=0; i<customs.length; i++)
- {
- if(p_name.equalsIgnoreCase(customs[i].getName()))
- {
- return customs[i].getValue();
- }
- }
- return null;
- }
-
-
+package graphing;
+
+import java.util.HashMap;
+
+import org.openuri.perf.Custom;
+import org.openuri.perf.Result;
+import org.openuri.perf.ResultSetDocument;
+
+public class ProducerUtil
+{
+
+ public static HashMap<Long,String> getFullnamesById(String p_regex, ResultSetDocument.ResultSet p_resultset)
+ {
+
+ Result[] results = p_resultset.getResultArray();
+ HashMap<Long,String> names = new HashMap<Long,String>();
+ for(int i=0; i<results.length; i++)
+ {
+ String name = results[i].getName();
+ Long id = results[i].getId();
+ Custom[] customs = results[i].getCustomArray();
+
+ if(customs.length > 0)
+ {
+ for(int j=0; j<customs.length; j++)
+ {
+ name = name+"["+customs[j].getName()+"="+customs[j].getValue()+"]";
+ }
+ }
+
+ if(name.matches(p_regex))
+ {
+ names.put(id,name);
+ }
+ }
+ return names;
+ }
+
+
+ public static String getCustomValue(String p_name, Result p_result)
+ {
+ Custom[] customs = p_result.getCustomArray();
+ for(int i=0; i<customs.length; i++)
+ {
+ if(p_name.equalsIgnoreCase(customs[i].getName()))
+ {
+ return customs[i].getValue();
+ }
+ }
+ return null;
+ }
+
+
}
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/ProducerUtil.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/SeriesProducer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/SnapshotProducer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/postprocessors/VerticalXLabel.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/postprocessors/VerticalXLabel.java?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/postprocessors/VerticalXLabel.java (original)
+++ beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/postprocessors/VerticalXLabel.java Fri Aug 12 08:12:28 2005
@@ -1,25 +1,25 @@
-package graphing.postprocessors;
-
-import java.util.Map;
-import de.laures.cewolf.ChartPostProcessor;
-import org.jfree.chart.JFreeChart;
-import org.jfree.chart.plot.CategoryPlot;
-import org.jfree.chart.axis.CategoryAxis;
-import org.jfree.chart.axis.*;
-//import org.jfree.ui.RectangleAnchor;
-//import org.jfree.text.TextBlockAnchor;
-//import org.jfree.ui.TextAnchor;
-//import org.jfree.chart.axis.CategoryLabelWidthType;
-
-public class VerticalXLabel implements ChartPostProcessor
-{
- public void processChart(Object chart, Map params)
- {
- // set the xaxis labels vertical
- CategoryPlot plot = ((JFreeChart)chart).getCategoryPlot();
- CategoryAxis axis = plot.getDomainAxis();
- axis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_45);
- //System.out.println("JUST SET LABEL POSITIONS");
- }
-}
-
+package graphing.postprocessors;
+
+import java.util.Map;
+import de.laures.cewolf.ChartPostProcessor;
+import org.jfree.chart.JFreeChart;
+import org.jfree.chart.plot.CategoryPlot;
+import org.jfree.chart.axis.CategoryAxis;
+import org.jfree.chart.axis.*;
+//import org.jfree.ui.RectangleAnchor;
+//import org.jfree.text.TextBlockAnchor;
+//import org.jfree.ui.TextAnchor;
+//import org.jfree.chart.axis.CategoryLabelWidthType;
+
+public class VerticalXLabel implements ChartPostProcessor
+{
+ public void processChart(Object chart, Map params)
+ {
+ // set the xaxis labels vertical
+ CategoryPlot plot = ((JFreeChart)chart).getCategoryPlot();
+ CategoryAxis axis = plot.getDomainAxis();
+ axis.setCategoryLabelPositions(CategoryLabelPositions.DOWN_45);
+ //System.out.println("JUST SET LABEL POSITIONS");
+ }
+}
+
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/src/graphing/postprocessors/VerticalXLabel.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/reportWeb/error.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/reportWeb/error.jsp?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/reportWeb/error.jsp (original)
+++ beehive/trunk/controls/test/perf/webapps/reportWeb/error.jsp Fri Aug 12 08:12:28 2005
@@ -1,7 +1,7 @@
-<%@ page language="java" contentType="text/html;charset=UTF-8"%>
-<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
-<netui:html>
- <netui:body>
- <p>ERROR: <netui:span value="${requestScope.msg}"/>
- </netui:body>
-</netui:html>
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<netui:html>
+ <netui:body>
+ <p>ERROR: <netui:span value="${requestScope.msg}"/>
+ </netui:body>
+</netui:html>
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/error.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Modified: beehive/trunk/controls/test/perf/webapps/reportWeb/index.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/perf/webapps/reportWeb/index.jsp?rev=232310&r1=232309&r2=232310&view=diff
==============================================================================
--- beehive/trunk/controls/test/perf/webapps/reportWeb/index.jsp (original)
+++ beehive/trunk/controls/test/perf/webapps/reportWeb/index.jsp Fri Aug 12 08:12:28 2005
@@ -1,32 +1,32 @@
-<%@ page language="java" contentType="text/html;charset=UTF-8"%>
-<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
-<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
-<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
-
-
-
-<netui:html>
- <head>
- <title>report web</title>
- <link rel="stylesheet" type="text/css" href="runtimePerf.css" />
- <meta content="text/html; charset=windows-1252" http-equiv=Content-Type>
- </head>
-
- <netui:body>
- <img src="images/runtime.jpeg" align="left">
- <img src="images/runtime.jpeg" align="right">
- <h1 class=margin>Runtime Performance Web</h1>
- <br><br><br><netui:label value="Runtime Perf Home"/>
-
- <br><br>
- This web application is a work in progress, however the core
- functionality that allows the analysis of result sets is
- functional.
-
- <br><a href="jpf/Controller.jpf">Analyze Results</a>
- <br><a href="docs/index.html">Controls Performance Javadocs</a>
-
- </netui:body>
-</netui:html>
-
-
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
+<%@ taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
+
+
+
+<netui:html>
+ <head>
+ <title>report web</title>
+ <link rel="stylesheet" type="text/css" href="runtimePerf.css" />
+ <meta content="text/html; charset=windows-1252" http-equiv=Content-Type>
+ </head>
+
+ <netui:body>
+ <img src="images/runtime.jpeg" align="left">
+ <img src="images/runtime.jpeg" align="right">
+ <h1 class=margin>Runtime Performance Web</h1>
+ <br><br><br><netui:label value="Runtime Perf Home"/>
+
+ <br><br>
+ This web application is a work in progress, however the core
+ functionality that allows the analysis of result sets is
+ functional.
+
+ <br><a href="jpf/Controller.jpf">Analyze Results</a>
+ <br><a href="docs/index.html">Controls Performance Javadocs</a>
+
+ </netui:body>
+</netui:html>
+
+
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: beehive/trunk/controls/test/perf/webapps/reportWeb/jpf/Controller.jpf
------------------------------------------------------------------------------
svn:eol-style = native