summaryrefslogtreecommitdiff
path: root/qpid/java/perftests/etc/testdefs
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-07-05 14:56:45 +0000
committerKeith Wall <kwall@apache.org>2012-07-05 14:56:45 +0000
commitc47834db296c0fda1bc97c662412a6310d788a5a (patch)
tree7dddf13443321d755e44fa7e2e4f6dd706ec51e0 /qpid/java/perftests/etc/testdefs
parent8b555d057f483874d9384c15bd989c975d18e0b0 (diff)
downloadqpid-python-c47834db296c0fda1bc97c662412a6310d788a5a.tar.gz
QPID-4110 added topic support to performance tests.
Specifically: - Added support for creating and tearing down durable subscriptions - Improved IterationValueTest so that we test the format for boolean properties (such as durableSubscription) - Added test and chart definitions Applied patch from Philip Harvey <phil@philharveyonline.com> git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1357650 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/perftests/etc/testdefs')
-rw-r--r--qpid/java/perftests/etc/testdefs/Topic-AckModes.js67
-rw-r--r--qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js64
-rw-r--r--qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js69
-rw-r--r--qpid/java/perftests/etc/testdefs/Topic-Persistence.js69
4 files changed, 269 insertions, 0 deletions
diff --git a/qpid/java/perftests/etc/testdefs/Topic-AckModes.js b/qpid/java/perftests/etc/testdefs/Topic-AckModes.js
new file mode 100644
index 0000000000..0ad519aa50
--- /dev/null
+++ b/qpid/java/perftests/etc/testdefs/Topic-AckModes.js
@@ -0,0 +1,67 @@
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic'";
+
+var jsonObject = {
+ _tests: [
+ {
+ "_name": "Topic ack modes",
+ "_iterations": [
+ {
+ "_acknowledgeMode": 1
+ },
+ {
+ "_acknowledgeMode": 2
+ },
+ {
+ "_acknowledgeMode": 3
+ }
+ ],
+ "_clients": [
+ {
+ "_name": "producingClient",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_producers": [
+ {
+ "_name": "Producer",
+ "_destinationName": topicName,
+ "_maximumDuration": duration
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ .concat(QPID.times(10,
+ {
+ "_name": "consumingClient-__INDEX",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_consumers": [
+ {
+ "_name": "Consumer-__INDEX",
+ "_destinationName": topicName,
+ "_maximumDuration": duration,
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "__INDEX"))
+ }]
+};
+
diff --git a/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js b/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js
new file mode 100644
index 0000000000..9351987115
--- /dev/null
+++ b/qpid/java/perftests/etc/testdefs/Topic-NumberOfConsumers.js
@@ -0,0 +1,64 @@
+var jsonObject = {
+ _tests:[]
+};
+
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic.1'";
+
+var numbersOfConsumers = [1, 10, 50, 100];
+
+for(i=0; i < numbersOfConsumers.length ; i++)
+{
+ var numberOfConsumers = numbersOfConsumers[i];
+ var test = {
+ "_name": numberOfConsumers,
+ "_clients":[
+ {
+ "_name": "producingClient",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_producers": [
+ {
+ "_name": "Producer1",
+ "_destinationName": topicName,
+ "_maximumDuration": duration
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ].concat(QPID.times(numberOfConsumers,
+ {
+ "_name": "consumingClient-__INDEX",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_consumers": [
+ {
+ "_name": "Consumer-__INDEX",
+ "_destinationName": topicName,
+ "_maximumDuration": duration
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "__INDEX"))
+ };
+
+ jsonObject._tests= jsonObject._tests.concat(test);
+}
+
diff --git a/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js b/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js
new file mode 100644
index 0000000000..227650a16d
--- /dev/null
+++ b/qpid/java/perftests/etc/testdefs/Topic-NumberOfTopics.js
@@ -0,0 +1,69 @@
+var jsonObject = {
+ _tests:[]
+};
+
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic.__INDEX'";
+
+var numbersOfTopics = [1, 10, 50, 100];
+
+// Each test has n pairs of producers and consumers, each with a different topic
+
+for(i=0; i < numbersOfTopics.length ; i++)
+{
+ var numberOfTopics = numbersOfTopics[i];
+ var test = {
+ "_name": numberOfTopics,
+ "_clients":
+ QPID.times(numberOfTopics,
+ {
+ "_name": "producingClient-__INDEX",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_producers": [
+ {
+ "_name": "Producer-__INDEX",
+ "_destinationName": topicName,
+ "_maximumDuration": duration
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "__INDEX")
+ .concat(
+ QPID.times(numberOfTopics,
+ {
+ "_name": "consumingClient-__INDEX",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_consumers": [
+ {
+ "_name": "Consumer-__INDEX",
+ "_destinationName": topicName,
+ "_maximumDuration": duration
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "__INDEX"))
+ };
+
+ jsonObject._tests= jsonObject._tests.concat(test);
+}
+
diff --git a/qpid/java/perftests/etc/testdefs/Topic-Persistence.js b/qpid/java/perftests/etc/testdefs/Topic-Persistence.js
new file mode 100644
index 0000000000..d843d37861
--- /dev/null
+++ b/qpid/java/perftests/etc/testdefs/Topic-Persistence.js
@@ -0,0 +1,69 @@
+var duration = 30000;
+var topicName = "topic://amq.topic/?routingkey='testTopic'";
+
+var jsonObject = {
+ _tests: [
+ {
+ "_name": "Topic persistence",
+ "_iterations": [
+ // note that we use _durableSubscription (the JaveBeans property name)
+ // rather than _isDurableSubscription (the field name)
+ {
+ "_deliveryMode": 1,
+ "_durableSubscription": false
+ },
+ {
+ "_deliveryMode": 2,
+ "_durableSubscription": true
+ }
+ ],
+ "_clients": [
+ {
+ "_name": "producingClient",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_producers": [
+ {
+ "_name": "Producer",
+ "_destinationName": topicName,
+ "_maximumDuration": duration,
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ .concat(QPID.times(10,
+ {
+ "_name": "consumingClient-__INDEX",
+ "_connections":[
+ {
+ "_name": "connection1",
+ "_factory": "connectionfactory",
+ "_sessions": [
+ {
+ "_sessionName": "session1",
+ "_consumers": [
+ {
+ "_name": "Consumer-__INDEX",
+ "_destinationName": topicName,
+ "_isTopic": true,
+ "_maximumDuration": duration,
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "__INDEX"))
+ }]
+};
+