Author: ningjiang
Date: Wed Jun 20 22:42:54 2007
New Revision: 549383
URL: http://svn.apache.org/viewvc?view=rev&rev=549383
Log:
Updated the performance testcase's start shells, added the HostName Port
operations
Modified:
incubator/cxf/trunk/benchmark/performance/README.txt
incubator/cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client
incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client.bat
incubator/cxf/trunk/benchmark/performance/basic_type/build.xml
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client
incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client.bat
incubator/cxf/trunk/benchmark/performance/complex_type/build.xml
incubator/cxf/trunk/benchmark/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
Modified: incubator/cxf/trunk/benchmark/performance/README.txt
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/README.txt?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/README.txt (original)
+++ incubator/cxf/trunk/benchmark/performance/README.txt Wed Jun 20 22:42:54
2007
@@ -41,7 +41,9 @@
-BasedOn Time setup the invoking count with time
-Amount define the invoke times , if based on time it means second
-PacketSize define the packet size which client send to server
- -Threads define the thread number to run the perform test
+ -Threads define the thread number to run the perform test
+ -HostName define the service provider's host name
+ -Port define the service provider's listen port number
Modified:
incubator/cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
---
incubator/cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
(original)
+++
incubator/cxf/trunk/benchmark/performance/base/src/org/apache/cxf/pat/internal/TestCaseBase.java
Wed Jun 20 22:42:54 2007
@@ -187,6 +187,7 @@
}
} catch (Exception e) {
e.printStackTrace();
+ System.exit(0);
}
}
@@ -262,13 +263,13 @@
public abstract void printUsage();
- public void printSetting(String settingType) {
+ public void printSetting(String settingType) {
+ System.out.println(settingType + " wsdl location is " + wsdlPath );
System.out.println(settingType + " [Service] -- > " + serviceName);
System.out.println(settingType + " [Port] -- > " + portName);
System.out.println(settingType + " [Operation] -- > " +
operationName);
System.out.println(settingType + " [Threads] -- > " +
numberOfThreads);
- System.out.println(settingType + " [Packet Size] -- > " + packetSize
- + " packet(s) ");
+ System.out.println(settingType + " [Packet Size] -- > " + packetSize
+ " packet(s) ");
if (usingTime) {
System.out.println(settingType + " [Running] --> " + amount + "
(secs)");
} else {
@@ -279,7 +280,7 @@
public void printTitle() {
System.out.println(" ---------------------------------");
- System.out.println(name + " Client (JAVA Version)");
+ System.out.println(name + " Client (JAVA Version)");
System.out.println(" ---------------------------------");
}
Modified: incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client
(original)
+++ incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client Wed Jun
20 22:42:54 2007
@@ -22,7 +22,8 @@
AMOUNT=30
PACKETSIZE=1
THREADS=0
-PIPE=
+HOST=localhost
+PORT=20000
for i in $@
do
@@ -51,17 +52,21 @@
THREADS=$2
fi
- if [ "$i" = "-Pipe" ]
+ if [ "$i" = "-HostName" ]
then
- PIPE=-Dpipe=-Pipe
+ HOST=$2
fi
+ if [ "$i" = "-Port" ]
+ then
+ PORT=$2
+ fi
+
shift
done
cd ..
-ant client -Dcxf.running.time=$AMOUNT -Dcxf.operation=$OPERARTION
-Dcxf.basedon=$BASEDON -Dcxf.packet.size=$PACKETSIZE -Dcxf.threads=$THREADS
$PIPE
-
+ant client -Dcxf.running.time=$AMOUNT -Dcxf.operation=$OPERARTION
-Dcxf.basedon=$BASEDON -Dcxf.packet.size=$PACKETSIZE -Dcxf.threads=$THREADS
-Dcxf.host.name=$HOST -Dcxf.port.name=$PORT
Modified:
incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client.bat
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client.bat?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client.bat
(original)
+++ incubator/cxf/trunk/benchmark/performance/basic_type/bin/run_client.bat Wed
Jun 20 22:42:54 2007
@@ -26,6 +26,8 @@
set OPERATION=echoString
set PACKETSIZE=1
set THREADS=1
+set HOST=localhost
+set PORT=20000
:Loop
IF "%1"=="" GOTO Continue
@@ -33,12 +35,14 @@
IF "%1"=="-Amount" (set AMOUNT=%2)
IF "%1"=="-Operation" (set OPERATION=%2)
IF "%1"=="-Threads" (set THREADS=%2)
+IF "%1"=="-HostName" (set HOST=%2)
+IF "%1"=="-Port" (set PORT=%2)
IF "%1"=="-PacketSize" (set PACKETSIZE=%2)
SHIFT
GOTO Loop
:Continue
-ant client -Dcxf.running.time=%AMOUNT% -Dcxf.operation=%OPERATION%
-Dcxf.basedon=%BASEDON% -Dcxf.packet.size=%PACKETSIZE% -Dcxf.threads=%THREADS%
+ant client -Dcxf.running.time=%AMOUNT% -Dcxf.operation=%OPERATION%
-Dcxf.basedon=%BASEDON% -Dcxf.packet.size=%PACKETSIZE% -Dcxf.threads=%THREADS%
-Dcxf.port.name=%PORT% -Dcxf.host.name=%HOST%
@endlocal
Modified: incubator/cxf/trunk/benchmark/performance/basic_type/build.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/basic_type/build.xml?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/basic_type/build.xml (original)
+++ incubator/cxf/trunk/benchmark/performance/basic_type/build.xml Wed Jun 20
22:42:54 2007
@@ -26,7 +26,7 @@
<property name="param" value=""/>
<property name="pipe" value=""/>
<cxf.client.run
classname="org.apache.cxf.performance.basic_type.client.Client" argline=
- "-WSDL ${wsdl.dir}/${wsdl.file}
+ "-WSDL
http://${cxf.host.name}:${cxf.port.name}/performance/basic_type/SoapPort?wsdl
-Amount ${cxf.running.time}
-BasedOn ${cxf.basedon}
-Operation ${cxf.operation}
Modified:
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
---
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
(original)
+++
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/client/Client.java
Wed Jun 20 22:42:54 2007
@@ -114,13 +114,7 @@
}
public void getPort() {
- if (usePipe) {
- try {
- new
Server("pipe://localhost:20000/performance/basic_type/SoapPort");
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
+
try {
URL wsdl = null;
if ((wsdlPath.startsWith("file://")) ||
(wsdlPath.startsWith("http://"))) {
@@ -133,12 +127,7 @@
e.printStackTrace();
}
port = ss.getSoapHttpPort();
-
- if (usePipe) {
- javax.xml.ws.BindingProvider provider =
(javax.xml.ws.BindingProvider)port;
-
provider.getRequestContext().put(provider.ENDPOINT_ADDRESS_PROPERTY,
-
"pipe://localhost:20000/performance/basic_type/SoapPort");
- }
+
}
}
Modified:
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
---
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
(original)
+++
incubator/cxf/trunk/benchmark/performance/basic_type/src/org/apache/cxf/performance/basic_type/server/ServerImpl.java
Wed Jun 20 22:42:54 2007
@@ -23,7 +23,9 @@
import org.apache.cxf.performance.basic_type.BasicPortType;
@javax.jws.WebService(portName = "SoapHttpPort", serviceName = "BasicService",
targetNamespace =
"http://cxf.apache.org/performance/basic_type",
- endpointInterface =
"org.apache.cxf.performance.basic_type.BasicPortType")
+ endpointInterface =
"org.apache.cxf.performance.basic_type.BasicPortType",
+ wsdlLocation = "wsdl/basic_type.wsdl"
+)
public class ServerImpl implements BasicPortType {
Modified: incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client
(original)
+++ incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client Wed
Jun 20 22:42:54 2007
@@ -22,7 +22,8 @@
AMOUNT=30
PACKETSIZE=1
THREADS=1
-PIPE=
+HOST=localhost
+PORT=20003
for i in $@
do
@@ -51,13 +52,18 @@
THREADS=$2
fi
- if [ "$i" = "-Pipe" ]
- then
- PIPE=-Dpipe=-Pipe
+ if [ "$i" = "-HostName" ]
+ then
+ HOST=$2
+ fi
+
+ if [ "$i" = "-PortName" ]
+ then
+ PORT=$2
fi
shift
done
cd ..
-ant client -Dcxf.running.time=$AMOUNT -Dcxf.operation=$OPERARTION
-Dcxf.basedon=$BASEDON -Dcxf.packet.size=$PACKETSIZE -Dcxf.threads=$THREADS
$PIPE
+ant client -Dcxf.running.time=$AMOUNT -Dcxf.operation=$OPERARTION
-Dcxf.basedon=$BASEDON -Dcxf.packet.size=$PACKETSIZE -Dcxf.threads=$THREADS
Modified:
incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client.bat
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client.bat?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client.bat
(original)
+++ incubator/cxf/trunk/benchmark/performance/complex_type/bin/run_client.bat
Wed Jun 20 22:42:54 2007
@@ -26,6 +26,8 @@
set OPERATION=sendReceiveData
set PACKETSIZE=1
set THREADS=1
+set PORT=20003
+set HOST=localhost
:Loop
IF "%1"=="" GOTO Continue
@@ -34,11 +36,13 @@
IF "%1"=="-Operation" (set OPERATION=%2)
IF "%1"=="-Threads" (set THREADS=%2)
IF "%1"=="-PacketSize" (set PACKETSIZE=%2)
+IF "%1"=="-Port" (set PORT=%2)
+IF "%1"=="-HostName" (set HOST=%2)
SHIFT
GOTO Loop
:Continue
-ant client -Dcxf.running.time=%AMOUNT% -Dcxf.operation=%OPERATION%
-Dcxf.basedon=%BASEDON% -Dcxf.packet.size=%PACKETSIZE% -Dcxf.threads=%THREADS%
+ant client -Dcxf.running.time=%AMOUNT% -Dcxf.operation=%OPERATION%
-Dcxf.basedon=%BASEDON% -Dcxf.packet.size=%PACKETSIZE% -Dcxf.threads=%THREADS%
-Dcxf.host.name=%HOST% -Dcxf.port.name=%PORT%
@endlocal
Modified: incubator/cxf/trunk/benchmark/performance/complex_type/build.xml
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/complex_type/build.xml?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
--- incubator/cxf/trunk/benchmark/performance/complex_type/build.xml (original)
+++ incubator/cxf/trunk/benchmark/performance/complex_type/build.xml Wed Jun 20
22:42:54 2007
@@ -28,8 +28,7 @@
<property name="param" value=""/>
<property name="pipe" value=""/>
- <cxf.client.run
classname="org.apache.cxf.performance.complex_type.client.Client"
argline="-WSDL ${wsdl.dir}/${wsdl.file}
-
-Amount ${cxf.running.time}
+ <cxf.client.run
classname="org.apache.cxf.performance.complex_type.client.Client"
argline="-WSDL
http://${cxf.host.name}:${cxf.port.name}/performance/complex_type/SoapPort?wsdl
-Amount ${cxf.running.time}
-BasedOn ${cxf.basedon}
-Operation ${cxf.operation}
-PacketSize ${cxf.packet.size}
Modified:
incubator/cxf/trunk/benchmark/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/trunk/benchmark/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java?view=diff&rev=549383&r1=549382&r2=549383
==============================================================================
---
incubator/cxf/trunk/benchmark/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
(original)
+++
incubator/cxf/trunk/benchmark/performance/complex_type/src/org/apache/cxf/performance/complex_type/client/Client.java
Wed Jun 20 22:42:54 2007
@@ -125,16 +125,7 @@
port.sendReceiveData(complexTypeSeq);
}
- public void getPort() {
- if (usePipe) {
- try {
- new
Server("pipe://localhost:20000/performance/complex_type/ComplexPort");
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- } else {
- System.out.println("not using pipe");
- }
+ public void getPort() {
try{
URL wsdl = null;
if ((wsdlPath.startsWith("file://")) ||
(wsdlPath.startsWith("http://"))) {
@@ -146,12 +137,7 @@
} catch (MalformedURLException e) {
e.printStackTrace();
}
- port = cs.getSoapPort();
- if (usePipe) {
- javax.xml.ws.BindingProvider provider =
(javax.xml.ws.BindingProvider)port;
-
provider.getRequestContext().put(provider.ENDPOINT_ADDRESS_PROPERTY,
-
"pipe://localhost:20000/performance/complex_type/ComplexPort");
- }
+ port = cs.getSoapPort();
}
public void printUsage() {