You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2012/04/23 14:44:39 UTC
svn commit: r1329215 [5/6] - in /qpid/trunk/qpid/java: perftests/etc/
perftests/etc/suite/ perftests/example/
perftests/src/main/java/org/apache/qpid/disttest/
perftests/src/main/java/org/apache/qpid/disttest/client/
perftests/src/main/java/org/apache/...
Added: qpid/trunk/qpid/java/perftests/example/PQBT-AA-Qpid-01.json
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/example/PQBT-AA-Qpid-01.json?rev=1329215&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/example/PQBT-AA-Qpid-01.json (added)
+++ qpid/trunk/qpid/java/perftests/example/PQBT-AA-Qpid-01.json Mon Apr 23 12:44:37 2012
@@ -0,0 +1,795 @@
+{
+ "_tests":[
+ {
+ "_name": "PQBT-AA-Qpid-01";
+ "_description": "16 clients, one 1P 1C each. Persistent, Auto-Ack, 10 minutes";
+ "_queues":[
+ {
+ "_name": "direct://amq.direct//testQueue1?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue2?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue3?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue4?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue5?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue6?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue7?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue8?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue9?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue10?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue11?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue12?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue13?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue14?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue15?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue16?durable='true'",
+ "_durable": true,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ }
+ ];
+ "_clients":[
+ {
+ "_name": "client1",
+ "_connections":[
+ {
+ "_name": "pconnection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession1",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer1",
+ "_destinationName": "direct://amq.direct//testQueue1?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession1",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer1",
+ "_destinationName": "direct://amq.direct//testQueue1?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client2",
+ "_connections":[
+ {
+ "_name": "pconnection2",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession2",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer2",
+ "_destinationName": "direct://amq.direct//testQueue2?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection2",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession2",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer2",
+ "_destinationName": "direct://amq.direct//testQueue2?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client3",
+ "_connections":[
+ {
+ "_name": "pconnection3",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession3",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer3",
+ "_destinationName": "direct://amq.direct//testQueue3?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection3",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession3",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer3",
+ "_destinationName": "direct://amq.direct//testQueue3?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client4",
+ "_connections":[
+ {
+ "_name": "pconnection4",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession4",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer4",
+ "_destinationName": "direct://amq.direct//testQueue4?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection4",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession4",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer4",
+ "_destinationName": "direct://amq.direct//testQueue4?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client5",
+ "_connections":[
+ {
+ "_name": "pconnection5",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession5",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer5",
+ "_destinationName": "direct://amq.direct//testQueue5?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection5",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession5",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer5",
+ "_destinationName": "direct://amq.direct//testQueue5?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client6",
+ "_connections":[
+ {
+ "_name": "pconnection6",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession6",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer6",
+ "_destinationName": "direct://amq.direct//testQueue6?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection6",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession6",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer6",
+ "_destinationName": "direct://amq.direct//testQueue6?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client7",
+ "_connections":[
+ {
+ "_name": "pconnection7",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession7",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer7",
+ "_destinationName": "direct://amq.direct//testQueue7?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection7",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession7",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer7",
+ "_destinationName": "direct://amq.direct//testQueue7?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client8",
+ "_connections":[
+ {
+ "_name": "pconnection8",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession8",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer8",
+ "_destinationName": "direct://amq.direct//testQueue8?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection8",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession8",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer8",
+ "_destinationName": "direct://amq.direct//testQueue8?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client9",
+ "_connections":[
+ {
+ "_name": "pconnection9",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession9",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer9",
+ "_destinationName": "direct://amq.direct//testQueue9?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection9",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession9",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer9",
+ "_destinationName": "direct://amq.direct//testQueue9?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client10",
+ "_connections":[
+ {
+ "_name": "pconnection10",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession10",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer10",
+ "_destinationName": "direct://amq.direct//testQueue10?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection10",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession10",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer10",
+ "_destinationName": "direct://amq.direct//testQueue10?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client11",
+ "_connections":[
+ {
+ "_name": "pconnection11",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession11",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer11",
+ "_destinationName": "direct://amq.direct//testQueue11?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection11",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession11",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer11",
+ "_destinationName": "direct://amq.direct//testQueue11?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client12",
+ "_connections":[
+ {
+ "_name": "pconnection12",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession12",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer12",
+ "_destinationName": "direct://amq.direct//testQueue12?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection12",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession12",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer12",
+ "_destinationName": "direct://amq.direct//testQueue12?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client13",
+ "_connections":[
+ {
+ "_name": "pconnection13",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession13",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer13",
+ "_destinationName": "direct://amq.direct//testQueue13?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection13",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession13",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer13",
+ "_destinationName": "direct://amq.direct//testQueue13?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client14",
+ "_connections":[
+ {
+ "_name": "pconnection14",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession14",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer14",
+ "_destinationName": "direct://amq.direct//testQueue14?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection14",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession14",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer14",
+ "_destinationName": "direct://amq.direct//testQueue14?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client15",
+ "_connections":[
+ {
+ "_name": "pconnection15",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession15",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer15",
+ "_destinationName": "direct://amq.direct//testQueue15?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection15",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession15",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer15",
+ "_destinationName": "direct://amq.direct//testQueue15?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client16",
+ "_connections":[
+ {
+ "_name": "pconnection16",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession16",
+ "_acknowledgeMode": 1,
+ "_producers": [
+ {
+ "_name": "Producer16",
+ "_destinationName": "direct://amq.direct//testQueue16?durable='true'",
+ "_messageSize": 256,
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection16",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession16",
+ "_acknowledgeMode": 1,
+ "_consumers": [
+ {
+ "_name": "Consumer16",
+ "_destinationName": "direct://amq.direct//testQueue16?durable='true'",
+ "_maximumDuration": 600000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }]
+}
Added: qpid/trunk/qpid/java/perftests/example/TQBT-TX-Qpid-01.json
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/example/TQBT-TX-Qpid-01.json?rev=1329215&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/example/TQBT-TX-Qpid-01.json (added)
+++ qpid/trunk/qpid/java/perftests/example/TQBT-TX-Qpid-01.json Mon Apr 23 12:44:37 2012
@@ -0,0 +1,843 @@
+{
+ "_tests":[
+ {
+ "_name": "TQBT-TX-Qpid-01";
+ "_description": "16 clients, one 1P 1C each. Non-Persistent, Transactional publisher batch 1, Transactional consumer batch 1000, 10 minutes";
+ "_queues":[
+ {
+ "_name": "direct://amq.direct//testQueue1",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue2",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue3",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue4",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue5",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue6",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue7",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue8",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue9",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue10",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue11",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue12",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue13",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue14",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue15",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ },
+ {
+ "_name": "direct://amq.direct//testQueue16",
+ "_durable": false,
+ "_attributes":
+ {
+ "x-qpid-capacity": 2000000,
+ "x-qpid-flow-resume-capacity": 1500000
+ }
+ }
+ ];
+ "_clients":[
+ {
+ "_name": "client1",
+ "_connections":[
+ {
+ "_name": "pconnection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession1",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer1",
+ "_destinationName": "direct://amq.direct//testQueue1",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession1",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer1",
+ "_destinationName": "direct://amq.direct//testQueue1",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client2",
+ "_connections":[
+ {
+ "_name": "pconnection2",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession2",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer2",
+ "_destinationName": "direct://amq.direct//testQueue2",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection2",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession2",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer2",
+ "_destinationName": "direct://amq.direct//testQueue2",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client3",
+ "_connections":[
+ {
+ "_name": "pconnection3",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession3",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer3",
+ "_destinationName": "direct://amq.direct//testQueue3",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection3",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession3",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer3",
+ "_destinationName": "direct://amq.direct//testQueue3",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client4",
+ "_connections":[
+ {
+ "_name": "pconnection4",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession4",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer4",
+ "_destinationName": "direct://amq.direct//testQueue4",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection4",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession4",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer4",
+ "_destinationName": "direct://amq.direct//testQueue4",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client5",
+ "_connections":[
+ {
+ "_name": "pconnection5",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession5",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer5",
+ "_destinationName": "direct://amq.direct//testQueue5",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection5",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession5",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer5",
+ "_destinationName": "direct://amq.direct//testQueue5",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client6",
+ "_connections":[
+ {
+ "_name": "pconnection6",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession6",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer6",
+ "_destinationName": "direct://amq.direct//testQueue6",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection6",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession6",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer6",
+ "_destinationName": "direct://amq.direct//testQueue6",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client7",
+ "_connections":[
+ {
+ "_name": "pconnection7",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession7",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer7",
+ "_destinationName": "direct://amq.direct//testQueue7",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection7",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession7",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer7",
+ "_destinationName": "direct://amq.direct//testQueue7",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client8",
+ "_connections":[
+ {
+ "_name": "pconnection8",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession8",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer8",
+ "_destinationName": "direct://amq.direct//testQueue8",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection8",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession8",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer8",
+ "_destinationName": "direct://amq.direct//testQueue8",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client9",
+ "_connections":[
+ {
+ "_name": "pconnection9",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession9",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer9",
+ "_destinationName": "direct://amq.direct//testQueue9",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection9",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession9",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer9",
+ "_destinationName": "direct://amq.direct//testQueue9",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client10",
+ "_connections":[
+ {
+ "_name": "pconnection10",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession10",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer10",
+ "_destinationName": "direct://amq.direct//testQueue10",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection10",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession10",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer10",
+ "_destinationName": "direct://amq.direct//testQueue10",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client11",
+ "_connections":[
+ {
+ "_name": "pconnection11",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession11",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer11",
+ "_destinationName": "direct://amq.direct//testQueue11",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection11",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession11",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer11",
+ "_destinationName": "direct://amq.direct//testQueue11",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client12",
+ "_connections":[
+ {
+ "_name": "pconnection12",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession12",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer12",
+ "_destinationName": "direct://amq.direct//testQueue12",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection12",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession12",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer12",
+ "_destinationName": "direct://amq.direct//testQueue12",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client13",
+ "_connections":[
+ {
+ "_name": "pconnection13",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession13",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer13",
+ "_destinationName": "direct://amq.direct//testQueue13",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection13",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession13",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer13",
+ "_destinationName": "direct://amq.direct//testQueue13",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client14",
+ "_connections":[
+ {
+ "_name": "pconnection14",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession14",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer14",
+ "_destinationName": "direct://amq.direct//testQueue14",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection14",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession14",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer14",
+ "_destinationName": "direct://amq.direct//testQueue14",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client15",
+ "_connections":[
+ {
+ "_name": "pconnection15",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession15",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer15",
+ "_destinationName": "direct://amq.direct//testQueue15",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection15",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession15",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer15",
+ "_destinationName": "direct://amq.direct//testQueue15",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "client16",
+ "_connections":[
+ {
+ "_name": "pconnection16",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "psession16",
+ "_acknowledgeMode": 0,
+ "_producers": [
+ {
+ "_name": "Producer16",
+ "_destinationName": "direct://amq.direct//testQueue16",
+ "_messageSize": 256,
+ "_deliveryMode": 1,
+ "_batchSize": 1,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_name": "cconnection16",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "csession16",
+ "_acknowledgeMode": 0,
+ "_consumers": [
+ {
+ "_name": "Consumer16",
+ "_destinationName": "direct://amq.direct//testQueue16",
+ "_batchSize": 1000,
+ "_numberOfMessages": 1500000
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }]
+}
Modified: qpid/trunk/qpid/java/perftests/example/run-client.sh
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/example/run-client.sh?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/example/run-client.sh (original)
+++ qpid/trunk/qpid/java/perftests/example/run-client.sh Mon Apr 23 12:44:37 2012
@@ -1 +1,21 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
java -cp ".:${QPID_HOME}/lib/*" -Dlog4j.configuration=log4j-client.properties -Dqpid.dest_syntax=BURL org.apache.qpid.disttest.ClientRunner jndi-config=perftests-jndi.properties
Modified: qpid/trunk/qpid/java/perftests/example/run.sh
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/example/run.sh?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/example/run.sh (original)
+++ qpid/trunk/qpid/java/perftests/example/run.sh Mon Apr 23 12:44:37 2012
@@ -1,2 +1,22 @@
-java -cp ".:${QPID_HOME}/lib/*" -Dqpid.dest_syntax=BURL org.apache.qpid.disttest.ControllerRunner jndi-config=perftests-jndi.properties test-config=$1 distributed=true
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+java -cp ".:${QPID_HOME}/lib/*" -Dqpid.dest_syntax=BURL org.apache.qpid.disttest.ControllerRunner jndi-config=perftests-jndi.properties test-config=$1 distributed=false
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/ControllerRunner.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/ControllerRunner.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/ControllerRunner.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/ControllerRunner.java Mon Apr 23 12:44:37 2012
@@ -19,9 +19,14 @@
*/
package org.apache.qpid.disttest;
+import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
+import java.io.FilenameFilter;
import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import javax.naming.Context;
@@ -41,13 +46,11 @@ public class ControllerRunner extends Ab
public static final String TEST_CONFIG_PROP = "test-config";
public static final String DISTRIBUTED_PROP = "distributed";
- public static final String OUTPUT_FILE_PROP = "outputfile";
+ public static final String OUTPUT_DIR_PROP = "outputdir";
private static final String TEST_CONFIG_DEFAULT = "perftests-config.json";
private static final String DISTRIBUTED_DEFAULT = "false";
- private static final String OUTPUT_FILE_DEFAULT = "output.csv";
-
- private Controller _controller;
+ private static final String OUTPUT_DIR_DEFAULT = ".";
private final Aggregator _aggregator = new Aggregator();
@@ -56,7 +59,7 @@ public class ControllerRunner extends Ab
{
getCliOptions().put(TEST_CONFIG_PROP, TEST_CONFIG_DEFAULT);
getCliOptions().put(DISTRIBUTED_PROP, DISTRIBUTED_DEFAULT);
- getCliOptions().put(OUTPUT_FILE_PROP, OUTPUT_FILE_DEFAULT);
+ getCliOptions().put(OUTPUT_DIR_PROP, OUTPUT_DIR_DEFAULT);
}
public static void main(String[] args) throws Exception
@@ -84,42 +87,65 @@ public class ControllerRunner extends Ab
private void runTests(ControllerJmsDelegate jmsDelegate)
{
+ Controller controller = new Controller(jmsDelegate, DistributedTestConstants.REGISTRATION_TIMEOUT, DistributedTestConstants.COMMAND_RESPONSE_TIMEOUT);
- _controller = new Controller(jmsDelegate,
- DistributedTestConstants.REGISTRATION_TIMEOUT, DistributedTestConstants.COMMAND_RESPONSE_TIMEOUT);
-
- Config testConfig = getTestConfig();
- _controller.setConfig(testConfig);
+ final List<String> testConfigFiles = getTestConfigFiles();
+ createClientsIfNotDistributed(testConfigFiles);
- if(!isDistributed())
+ try
{
- //we must create the required test clients, running in single-jvm mode
- int numClients = testConfig.getTotalNumberOfClients();
- for (int i = 1; i <= numClients; i++)
+ for (String testConfigFile : testConfigFiles)
{
- ClientRunner clientRunner = new ClientRunner();
- clientRunner.setJndiPropertiesFileLocation(getJndiConfig());
- clientRunner.runClients();
- }
- }
+ final Config testConfig = buildTestConfigFrom(testConfigFile);
+ controller.setConfig(testConfig);
- ResultsForAllTests resultsForAllTests = null;
- try
- {
- _controller.awaitClientRegistrations();
+ controller.awaitClientRegistrations();
- ResultsForAllTests rawResultsForAllTests = _controller.runAllTests();
- resultsForAllTests = _aggregator.aggregateResults(rawResultsForAllTests);
+ LOGGER.info("Running test : " + testConfigFile);
+ runTest(controller, testConfigFile);
+ }
}
finally
{
- _controller.stopAllRegisteredClients();
+ controller.stopAllRegisteredClients();
}
- final String outputFile = getOutputFile();
+ }
+
+ private void runTest(Controller controller, String testConfigFile)
+ {
+ final Config testConfig = buildTestConfigFrom(testConfigFile);
+ controller.setConfig(testConfig);
+
+ ResultsForAllTests rawResultsForAllTests = controller.runAllTests();
+ ResultsForAllTests resultsForAllTests = _aggregator.aggregateResults(rawResultsForAllTests);
+
+ final String outputFile = generateOutputCsvNameFrom(testConfigFile);
writeResultsToFile(resultsForAllTests, outputFile);
}
+ private void createClientsIfNotDistributed(final List<String> testConfigFiles)
+ {
+ if(!isDistributed())
+ {
+ int maxNumberOfClients = 0;
+ for (String testConfigFile : testConfigFiles)
+ {
+ final Config testConfig = buildTestConfigFrom(testConfigFile);
+ final int numClients = testConfig.getTotalNumberOfClients();
+ maxNumberOfClients = Math.max(numClients, maxNumberOfClients);
+ }
+
+ //we must create the required test clients, running in single-jvm mode
+ for (int i = 1; i <= maxNumberOfClients; i++)
+ {
+ ClientRunner clientRunner = new ClientRunner();
+ clientRunner.setJndiPropertiesFileLocation(getJndiConfig());
+ clientRunner.runClients();
+ }
+ }
+ }
+
private void writeResultsToFile(ResultsForAllTests resultsForAllTests, String outputFile)
{
FileWriter writer = null;
@@ -150,22 +176,55 @@ public class ControllerRunner extends Ab
}
}
- private String getOutputFile()
+ private String generateOutputCsvNameFrom(String testConfigFile)
+ {
+ final String filenameOnlyWithExtension = new File(testConfigFile).getName();
+ final String cvsFile = filenameOnlyWithExtension.replaceFirst(".?\\w*$", ".csv");
+ final String outputDir = String.valueOf(getCliOptions().get(ControllerRunner.OUTPUT_DIR_PROP));
+
+ return new File(outputDir, cvsFile).getAbsolutePath();
+ }
+
+ private List<String> getTestConfigFiles()
{
- return String.valueOf(getCliOptions().get(ControllerRunner.OUTPUT_FILE_PROP));
+ final List<String> testConfigFile = new ArrayList<String>();
+ final File configFileOrDirectory = new File(getCliOptions().get(ControllerRunner.TEST_CONFIG_PROP));
+
+ if (configFileOrDirectory.isDirectory())
+ {
+ final String[] configFiles = configFileOrDirectory.list(new FilenameFilter()
+ {
+ @Override
+ public boolean accept(File dir, String name)
+ {
+ return new File(dir, name).isFile() && name.endsWith(".json");
+ }
+ });
+
+ for (String configFile : configFiles)
+ {
+ testConfigFile.add(new File(configFileOrDirectory, configFile).getAbsolutePath());
+ }
+ }
+ else
+ {
+ testConfigFile.add(configFileOrDirectory.getAbsolutePath());
+ }
+
+ return testConfigFile;
}
- private Config getTestConfig()
+ private Config buildTestConfigFrom(String testConfigFile)
{
ConfigReader configReader = new ConfigReader();
Config testConfig;
try
{
- testConfig = configReader.getConfigFromFile(getCliOptions().get(ControllerRunner.TEST_CONFIG_PROP));
+ testConfig = configReader.getConfigFromFile(testConfigFile);
}
catch (FileNotFoundException e)
{
- throw new DistributedTestException("Exception while loading test config", e);
+ throw new DistributedTestException("Exception while loading test config from " + testConfigFile, e);
}
return testConfig;
}
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/client/ParticipantResultFactory.java Mon Apr 23 12:44:37 2012
@@ -42,25 +42,30 @@ public class ParticipantResultFactory
consumerParticipantResult.setSelector(command.getSelector() != null);
consumerParticipantResult.setNoLocal(command.isNoLocal());
consumerParticipantResult.setSynchronousConsumer(command.isSynchronous());
+ consumerParticipantResult.setTotalNumberOfConsumers(1);
+ consumerParticipantResult.setTotalNumberOfProducers(0);
return consumerParticipantResult;
}
public ProducerParticipantResult createForProducer(String participantName, String clientRegisteredName, CreateProducerCommand command, int numberOfMessagesSent, int payloadSize, long totalPayloadSent, Date start, Date end)
{
- final ProducerParticipantResult participantResult = new ProducerParticipantResult();
+ final ProducerParticipantResult producerParticipantResult = new ProducerParticipantResult();
- participantResult.setStartDelay(command.getStartDelay());
- participantResult.setDeliveryMode(command.getDeliveryMode());
- participantResult.setPriority(command.getPriority());
- participantResult.setInterval(command.getInterval());
- participantResult.setTimeToLive(command.getTimeToLive());
+ producerParticipantResult.setStartDelay(command.getStartDelay());
+ producerParticipantResult.setDeliveryMode(command.getDeliveryMode());
+ producerParticipantResult.setPriority(command.getPriority());
+ producerParticipantResult.setInterval(command.getInterval());
+ producerParticipantResult.setTimeToLive(command.getTimeToLive());
+ producerParticipantResult.setTotalNumberOfConsumers(0);
+ producerParticipantResult.setTotalNumberOfProducers(1);
- setTestProperties(participantResult, command, participantName, clientRegisteredName);
- setTestResultProperties(participantResult, numberOfMessagesSent, payloadSize, totalPayloadSent, start, end);
+ setTestProperties(producerParticipantResult, command, participantName, clientRegisteredName);
- return participantResult;
+ setTestResultProperties(producerParticipantResult, numberOfMessagesSent, payloadSize, totalPayloadSent, start, end);
+
+ return producerParticipantResult;
}
private void setTestResultProperties(final ParticipantResult participantResult, int numberOfMessagesSent, int payloadSize, long totalPayloadReceived, Date start, Date end)
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/ClientRegistry.java Mon Apr 23 12:44:37 2012
@@ -33,6 +33,8 @@ public class ClientRegistry
private final Set<String> _registeredClientNames = new ConcurrentSkipListSet<String>();
+ private final Object _lock = new Object();
+
public void registerClient(String clientName)
{
final boolean alreadyContainsClient = !_registeredClientNames.add(clientName);
@@ -41,12 +43,54 @@ public class ClientRegistry
throw new DistributedTestException("Duplicate client name " + clientName);
}
- LOGGER.info("Client registered: " + clientName);
+ notifyAllWaiters();
+
+ if (LOGGER.isInfoEnabled())
+ {
+ LOGGER.info("Client registered: " + clientName);
+ }
}
+
public Collection<String> getClients()
{
return Collections.unmodifiableSet(_registeredClientNames);
}
+ public int awaitClients(int numberOfClientsToAwait, long timeout)
+ {
+ final long endTime = System.currentTimeMillis() + timeout;
+
+ int numberOfClientsAbsent = numberOfClientsToAwait - _registeredClientNames.size();
+ long remainingTimeout = endTime - System.currentTimeMillis();
+
+ while(numberOfClientsAbsent > 0 && remainingTimeout > 0)
+ {
+ synchronized (_lock)
+ {
+ try
+ {
+ _lock.wait(remainingTimeout);
+ }
+ catch (InterruptedException e)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+
+ numberOfClientsAbsent = numberOfClientsToAwait - _registeredClientNames.size();
+ remainingTimeout = endTime - System.currentTimeMillis();
+ }
+
+ return numberOfClientsAbsent < 0 ? 0 : numberOfClientsAbsent;
+ }
+
+ private void notifyAllWaiters()
+ {
+ synchronized (_lock)
+ {
+ _lock.notifyAll();
+ }
+ }
+
}
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/Controller.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/Controller.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/Controller.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/controller/Controller.java Mon Apr 23 12:44:37 2012
@@ -44,7 +44,6 @@ public class Controller
private final ControllerJmsDelegate _jmsDelegate;
- private volatile CountDownLatch _clientRegistrationLatch;
private volatile CountDownLatch _stopClientsResponseLatch = null;
private Config _config;
@@ -60,25 +59,29 @@ public class Controller
_commandResponseTimeout = commandResponseTimeout;
_testRunnerFactory = new TestRunnerFactory();
_clientRegistry = new ClientRegistry();
+
+ _jmsDelegate.addCommandListener(new RegisterClientCommandListener());
+ _jmsDelegate.addCommandListener(new StopClientResponseListener());
+ _jmsDelegate.start();
}
public void setConfig(Config config)
{
_config = config;
validateConfiguration();
- int numberOfClients = config.getTotalNumberOfClients();
- _clientRegistrationLatch = new CountDownLatch(numberOfClients);
-
- _jmsDelegate.addCommandListener(new RegisterClientCommandListener());
- _jmsDelegate.addCommandListener(new StopClientResponseListener());
- _jmsDelegate.start();
}
-
public void awaitClientRegistrations()
{
- LOGGER.info("Awaiting client registration");
- awaitLatch(_clientRegistrationLatch, _registrationTimeout, "Timed out waiting for registrations. Expecting %d more registrations");
+ LOGGER.info("Awaiting client registrations");
+
+ final int numberOfAbsentClients = _clientRegistry.awaitClients(_config.getTotalNumberOfClients(), _registrationTimeout);
+ if (numberOfAbsentClients > 0)
+ {
+ String formattedMessage = String.format("Timed out waiting for registrations. Expecting %d more registrations", numberOfAbsentClients);
+ throw new DistributedTestException(formattedMessage);
+ }
+
}
private void validateConfiguration()
@@ -111,15 +114,13 @@ public class Controller
{
final String clientName = registrationCommand.getClientName();
- _clientRegistry.registerClient(clientName);
_jmsDelegate.registerClient(registrationCommand);
-
- _clientRegistrationLatch.countDown();
- LOGGER.info("Counted down latch for client: " + clientName + " latch count=" + _clientRegistrationLatch.getCount());
+ _clientRegistry.registerClient(clientName);
}
void processStopClientResponse(final Response response)
{
+ // TODO clientRegistry should expose a deregisterClient
_stopClientsResponseLatch.countDown();
if (response.hasError())
{
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantAttribute.java Mon Apr 23 12:44:37 2012
@@ -29,29 +29,31 @@ import org.apache.qpid.disttest.client.P
*/
public enum ParticipantAttribute
{
- TEST_NAME("Test Name"),
- ITERATION_NUMBER("Iteration number"),
- CONFIGURED_CLIENT_NAME("Client Name"),
- PARTICIPANT_NAME("Participant name"),
- NUMBER_OF_MESSAGES_PROCESSED("Number of messages"),
- PAYLOAD_SIZE("Payload size (bytes)"),
- PRIORITY("Priority"),
- TIME_TO_LIVE("Time to live (ms)"),
- DELIVERY_MODE("Delivery mode"),
- BATCH_SIZE("Batch size"),
- MAXIMUM_DURATION("Maximum duration (ms)"),
- PRODUCER_START_DELAY("Producer start delay (ms)"),
- PRODUCER_INTERVAL("Producer interval (ms)"),
- IS_TOPIC("Is topic"),
- IS_DURABLE_SUBSCRIPTION("Is durable subscription"),
- IS_BROWSIING_SUBSCRIPTION("Is browsing subscription"),
- IS_SELECTOR("Is selector"),
- IS_NO_LOCAL("Is no local"),
- IS_SYNCHRONOUS_CONSUMER("Is synchronous consumer"),
- TOTAL_PAYLOAD_PROCESSED("Total payload processed (bytes)"),
- THROUGHPUT("Throughput (kbytes/s)"),
- TIME_TAKEN("Time taken (ms)"),
- ERROR_MESSAGE("Error message");
+ TEST_NAME("testName"),
+ ITERATION_NUMBER("iterationNumber"),
+ CONFIGURED_CLIENT_NAME("clientName"),
+ PARTICIPANT_NAME("participantName"),
+ NUMBER_OF_MESSAGES_PROCESSED("numberOfMessages"),
+ PAYLOAD_SIZE("payloadSizeB"),
+ PRIORITY("priority"),
+ TIME_TO_LIVE("timeToLiveMs"),
+ DELIVERY_MODE("deliveryMode"),
+ BATCH_SIZE("batchSize"),
+ MAXIMUM_DURATION("maximumDurationMs"),
+ PRODUCER_START_DELAY("producerStartDelayMs"),
+ PRODUCER_INTERVAL("producerIntervalMs"),
+ IS_TOPIC("isTopic"),
+ IS_DURABLE_SUBSCRIPTION("isDurableSubscription"),
+ IS_BROWSIING_SUBSCRIPTION("isBrowsingSubscription"),
+ IS_SELECTOR("isSelector"),
+ IS_NO_LOCAL("isNoLocal"),
+ IS_SYNCHRONOUS_CONSUMER("isSynchronousConsumer"),
+ TOTAL_NUMBER_OF_CONSUMERS("totalNumberOfConsumers"),
+ TOTAL_NUMBER_OF_PRODUCERS("totalNumberOfProducers"),
+ TOTAL_PAYLOAD_PROCESSED("totalPayloadProcessedB"),
+ THROUGHPUT("throughputKbPerS"),
+ TIME_TAKEN("timeTakenMs"),
+ ERROR_MESSAGE("errorMessage");
private String _displayName;
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/message/ParticipantResult.java Mon Apr 23 12:44:37 2012
@@ -49,6 +49,10 @@ public class ParticipantResult extends R
private int _payloadSize;
private double _throughput;
+ private int _totalNumberOfConsumers;
+ private int _totalNumberOfProducers;
+
+
public static final Comparator<? super ParticipantResult> PARTICIPANT_NAME_COMPARATOR = new Comparator<ParticipantResult>()
{
@Override
@@ -228,4 +232,26 @@ public class ParticipantResult extends R
_throughput = throughput;
}
+ public void setTotalNumberOfConsumers(int totalNumberOfConsumers)
+ {
+ _totalNumberOfConsumers = totalNumberOfConsumers;
+ }
+
+ @OutputAttribute(attribute=ParticipantAttribute.TOTAL_NUMBER_OF_CONSUMERS)
+ public int getTotalNumberOfConsumers()
+ {
+ return _totalNumberOfConsumers;
+ }
+
+ public void setTotalNumberOfProducers(int totalNumberOfProducers)
+ {
+ _totalNumberOfProducers = totalNumberOfProducers;
+ }
+
+ @OutputAttribute(attribute=ParticipantAttribute.TOTAL_NUMBER_OF_PRODUCERS)
+ public int getTotalNumberOfProducers()
+ {
+ return _totalNumberOfProducers;
+ }
+
}
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/ParticipantResultAggregator.java Mon Apr 23 12:44:37 2012
@@ -35,14 +35,17 @@ public class ParticipantResultAggregator
private long _numberOfMessagesProcessed = 0;
private long _totalPayloadProcessed = 0;
+ private int _totalNumberOfConsumers = 0;
+ private int _totalNumberOfProducers = 0;
+
private NavigableSet<Integer> _encounteredPayloadSizes = new TreeSet<Integer>();
private NavigableSet<Integer> _encounteredIterationNumbers = new TreeSet<Integer>();
private NavigableSet<String> _encountedTestNames = new TreeSet<String>();
- public ParticipantResultAggregator(Class<? extends ParticipantResult> taregtClass, String aggregateResultName)
+ public ParticipantResultAggregator(Class<? extends ParticipantResult> targetClass, String aggregateResultName)
{
_aggregatedResultName = aggregateResultName;
- _targetClass = taregtClass;
+ _targetClass = targetClass;
}
public void aggregate(ParticipantResult result)
@@ -73,6 +76,8 @@ public class ParticipantResultAggregator
{
_numberOfMessagesProcessed += result.getNumberOfMessagesProcessed();
_totalPayloadProcessed += result.getTotalPayloadProcessed();
+ _totalNumberOfConsumers += result.getTotalNumberOfConsumers();
+ _totalNumberOfProducers += result.getTotalNumberOfProducers();
_minStartDate = Math.min(_minStartDate, result.getStartInMillis());
_maxEndDate = Math.max(_maxEndDate, result.getEndInMillis());
}
@@ -91,6 +96,8 @@ public class ParticipantResultAggregator
{
aggregatedResult.setNumberOfMessagesProcessed(_numberOfMessagesProcessed);
aggregatedResult.setTotalPayloadProcessed(_totalPayloadProcessed);
+ aggregatedResult.setTotalNumberOfConsumers(_totalNumberOfConsumers);
+ aggregatedResult.setTotalNumberOfProducers(_totalNumberOfProducers);
aggregatedResult.setStartDate(new Date(_minStartDate));
aggregatedResult.setEndDate(new Date(_maxEndDate));
aggregatedResult.setThroughput(calculateThroughputInKiloBytesPerSecond());
Modified: qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java (original)
+++ qpid/trunk/qpid/java/perftests/src/main/java/org/apache/qpid/disttest/results/aggregation/TestResultAggregator.java Mon Apr 23 12:44:37 2012
@@ -79,19 +79,21 @@ public class TestResultAggregator
}
private ParticipantResult buildAllResultFromOtherAggregatedResults(
- ParticipantResult aggregatedProducerResult, ParticipantResult aggregaredConsumerResult)
+ ParticipantResult aggregatedProducerResult, ParticipantResult aggregatedConsumerResult)
{
ParticipantResult aggregatedAllResult = new ParticipantResult(ALL_PARTICIPANTS_NAME);
aggregatedAllResult.setStartDate(aggregatedProducerResult.getStartDate());
- aggregatedAllResult.setEndDate(aggregaredConsumerResult.getEndDate());
+ aggregatedAllResult.setEndDate(aggregatedConsumerResult.getEndDate());
- aggregatedAllResult.setIterationNumber(aggregaredConsumerResult.getIterationNumber());
- aggregatedAllResult.setTestName(aggregaredConsumerResult.getTestName());
- aggregatedAllResult.setNumberOfMessagesProcessed(aggregaredConsumerResult.getNumberOfMessagesProcessed());
- aggregatedAllResult.setPayloadSize(aggregaredConsumerResult.getPayloadSize());
- aggregatedAllResult.setTotalPayloadProcessed(aggregaredConsumerResult.getTotalPayloadProcessed());
- aggregatedAllResult.setThroughput(aggregaredConsumerResult.getThroughput());
+ aggregatedAllResult.setIterationNumber(aggregatedConsumerResult.getIterationNumber());
+ aggregatedAllResult.setTestName(aggregatedConsumerResult.getTestName());
+ aggregatedAllResult.setNumberOfMessagesProcessed(aggregatedConsumerResult.getNumberOfMessagesProcessed());
+ aggregatedAllResult.setPayloadSize(aggregatedConsumerResult.getPayloadSize());
+ aggregatedAllResult.setTotalPayloadProcessed(aggregatedConsumerResult.getTotalPayloadProcessed());
+ aggregatedAllResult.setThroughput(aggregatedConsumerResult.getThroughput());
+ aggregatedAllResult.setTotalNumberOfProducers(aggregatedProducerResult.getTotalNumberOfProducers());
+ aggregatedAllResult.setTotalNumberOfConsumers(aggregatedConsumerResult.getTotalNumberOfConsumers());
return aggregatedAllResult;
}
Modified: qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ConsumerParticipantTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ConsumerParticipantTest.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ConsumerParticipantTest.java (original)
+++ qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ConsumerParticipantTest.java Mon Apr 23 12:44:37 2012
@@ -18,7 +18,7 @@
*/
package org.apache.qpid.disttest.client;
-import static org.apache.qpid.disttest.client.ParticipantTestHelper.assertExpectedResults;
+import static org.apache.qpid.disttest.client.ParticipantTestHelper.assertExpectedConsumerResults;
import static org.mockito.Matchers.anyLong;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.atLeastOnce;
@@ -104,7 +104,7 @@ public class ConsumerParticipantTest ext
ParticipantResult result = _consumerParticipant.doIt(CLIENT_NAME);
- assertExpectedResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);
+ assertExpectedConsumerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);
_inOrder.verify(_delegate).consumeMessage(PARTICIPANT_NAME1, RECEIVE_TIMEOUT);
_inOrder.verify(_delegate).calculatePayloadSizeFrom(_mockMessage);
@@ -118,7 +118,7 @@ public class ConsumerParticipantTest ext
ParticipantResult result = _consumerParticipant.doIt(CLIENT_NAME);
- assertExpectedResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, null, PAYLOAD_SIZE_PER_MESSAGE, null, duration);
+ assertExpectedConsumerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, null, PAYLOAD_SIZE_PER_MESSAGE, null, duration);
verify(_delegate, atLeastOnce()).consumeMessage(PARTICIPANT_NAME1, RECEIVE_TIMEOUT);
verify(_delegate, atLeastOnce()).calculatePayloadSizeFrom(_mockMessage);
@@ -134,7 +134,7 @@ public class ConsumerParticipantTest ext
ParticipantResult result = _consumerParticipant.doIt(CLIENT_NAME);
- assertExpectedResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);
+ assertExpectedConsumerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, numberOfMessages, PAYLOAD_SIZE_PER_MESSAGE, totalPayloadSize, null);
verify(_delegate, times(numberOfMessages)).consumeMessage(PARTICIPANT_NAME1, RECEIVE_TIMEOUT);
verify(_delegate, times(numberOfMessages)).calculatePayloadSizeFrom(_mockMessage);
@@ -157,7 +157,7 @@ public class ConsumerParticipantTest ext
final int expectedPayloadResultPayloadSize = 0;
final long totalPayloadSize = firstPayloadSize + secondPayloadSize + thirdPayloadSize;
- assertExpectedResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, numberOfMessages, expectedPayloadResultPayloadSize, totalPayloadSize, null);
+ assertExpectedConsumerResults(result, PARTICIPANT_NAME1, CLIENT_NAME, _testStartTime, numberOfMessages, expectedPayloadResultPayloadSize, totalPayloadSize, null);
verify(_delegate, times(numberOfMessages)).consumeMessage(PARTICIPANT_NAME1, RECEIVE_TIMEOUT);
verify(_delegate, times(numberOfMessages)).calculatePayloadSizeFrom(_mockMessage);
Modified: qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java?rev=1329215&r1=1329214&r2=1329215&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java (original)
+++ qpid/trunk/qpid/java/perftests/src/test/java/org/apache/qpid/disttest/client/ParticipantResultFactoryTest.java Mon Apr 23 12:44:37 2012
@@ -76,6 +76,9 @@ public class ParticipantResultFactoryTes
long timeToLive = 60;
command.setTimeToLive(timeToLive);
+ int totalNumberOfConsumers = 0;
+ int totalNumberOfProducers = 1;
+
ProducerParticipantResult result = _participantResultFactory.createForProducer(PARTICIPANT_NAME,
REGISTERED_CLIENT_NAME,
command,
@@ -92,6 +95,8 @@ public class ParticipantResultFactoryTes
assertEquals(producerInterval, result.getInterval());
assertEquals(producerStartDelay, result.getStartDelay());
assertEquals(timeToLive, result.getTimeToLive());
+ assertEquals(totalNumberOfConsumers, result.getTotalNumberOfConsumers());
+ assertEquals(totalNumberOfProducers, result.getTotalNumberOfProducers());
}
public void testCreateForConsumer()
@@ -118,6 +123,9 @@ public class ParticipantResultFactoryTes
boolean synchronousConsumer = true;
command.setSynchronous(synchronousConsumer);
+ int totalNumberOfConsumers = 1;
+ int totalNumberOfProducers = 0;
+
ConsumerParticipantResult result = _participantResultFactory.createForConsumer(PARTICIPANT_NAME,
REGISTERED_CLIENT_NAME,
command,
@@ -135,6 +143,8 @@ public class ParticipantResultFactoryTes
assertEquals(isSelector, result.isSelector());
assertEquals(noLocal, result.isNoLocal());
assertEquals(synchronousConsumer, result.isSynchronousConsumer());
+ assertEquals(totalNumberOfConsumers, result.getTotalNumberOfConsumers());
+ assertEquals(totalNumberOfProducers, result.getTotalNumberOfProducers());
}
public void testCreateForError()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org