qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1647521 - in /qpid/trunk/qpid/java/perftests/etc: json_config_tool.py perftests-jndi.properties testdefs/VaryingNumberOfParticipants.js testdefs/VaryingNumberOfParticipantsSSL.js
Date Tue, 23 Dec 2014 09:50:14 GMT
Author: kwall
Date: Tue Dec 23 09:50:14 2014
New Revision: 1647521

URL: http://svn.apache.org/r1647521
Log:
QPID-6284: [Java Broker Tests] Add system test demonstrating the effect of using SSL on a
connection.

* VaryingNumberOfParticipants x axis extended to 20 participants as on current test hardware,
existing maximum
  parameter (10) did not show the point at which returns begin to diminish.
* Cloned VaryingNumberOfParticipants for the SSL test.

Added:
    qpid/trunk/qpid/java/perftests/etc/json_config_tool.py   (with props)
    qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipantsSSL.js
      - copied, changed from r1647319, qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js
Modified:
    qpid/trunk/qpid/java/perftests/etc/perftests-jndi.properties
    qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js

Added: qpid/trunk/qpid/java/perftests/etc/json_config_tool.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/json_config_tool.py?rev=1647521&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/json_config_tool.py (added)
+++ qpid/trunk/qpid/java/perftests/etc/json_config_tool.py Tue Dec 23 09:50:14 2014
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+#
+# 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.
+#
+
+from StringIO import StringIO
+import json
+import sys
+import re
+import argparse
+
+def transform(data):
+  if isinstance(data, tuple):
+    (k, v) = data;
+    return k, transform(v)
+  elif isinstance(data, list):
+    return [transform(i) for i in data]
+  elif isinstance(data, dict):
+    if "name" in data and data["name"] == objname:
+      data[attrname] = attrvalue
+    return data
+  else:
+    return data
+
+
+parser = argparse.ArgumentParser(description='Adds (or updates) a attribute name/value pair
of an existing object within a Java Broker config.json')
+parser.add_argument("objectname", help='Name of the object e.g. httpManagement')
+parser.add_argument("attrname", help='Name of the attribute to add or update e.g. httpBasicAuthenticationEnabled')
+parser.add_argument("attrvalue", help='Value of the attribute e.g. true')
+args = parser.parse_args()
+
+objname = args.objectname
+attrname = args.attrname
+attrvalue = args.attrvalue
+
+# Expects a config.json to be provided on stdin, write the resulting json to stdout.
+
+lines = []
+for line in sys.stdin:
+  lines.append(line.rstrip())
+
+# naive strip C style comments - this deals with the Apache licence comment present on the
default config
+input = re.sub("/\*.*?\*/", " ", "".join(lines), re.S)
+
+data = json.load(StringIO(input))
+data = dict([transform((k, v)) for k,v in data.items()])
+
+json.dump(data, sys.stdout, sort_keys=True, indent=2)

Propchange: qpid/trunk/qpid/java/perftests/etc/json_config_tool.py
------------------------------------------------------------------------------
    svn:executable = *

Modified: qpid/trunk/qpid/java/perftests/etc/perftests-jndi.properties
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/perftests-jndi.properties?rev=1647521&r1=1647520&r2=1647521&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/perftests-jndi.properties (original)
+++ qpid/trunk/qpid/java/perftests/etc/perftests-jndi.properties Tue Dec 23 09:50:14 2014
@@ -18,6 +18,7 @@
 java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
 
 connectionfactory.connectionfactory = amqp://guest:guest@clientid/?brokerlist='tcp://localhost:5672'
+connectionfactory.sslconnectionfactory = amqp://guest:guest@clientid/?ssl='true'&brokerlist='tcp://localhost:5671'
 
 destination.controllerqueue = direct://amq.direct//controllerqueue?autodelete='true'
 

Modified: qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js?rev=1647521&r1=1647520&r2=1647521&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js (original)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js Tue Dec 23
09:50:14 2014
@@ -25,8 +25,8 @@ var jsonObject = {
 var duration = 30000;
 var queueName = "direct://amq.direct//varNumOfParticipants?durable='true'";
 
-var numbersOfProducers = [1, 2, 5, 10];
-var numbersOfConsumers = [1, 2, 5, 10];
+var numbersOfProducers = [1, 2, 5, 10, 20];
+var numbersOfConsumers = [1, 2, 5, 10, 20];
 
 for(producersIndex=0; producersIndex < numbersOfProducers.length; producersIndex++)
 {

Copied: qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipantsSSL.js (from
r1647319, qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipantsSSL.js?p2=qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipantsSSL.js&p1=qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js&r1=1647319&r2=1647521&rev=1647521&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipants.js (original)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/VaryingNumberOfParticipantsSSL.js Tue Dec
23 09:50:14 2014
@@ -23,10 +23,10 @@ var jsonObject = {
 };
 
 var duration = 30000;
-var queueName = "direct://amq.direct//varNumOfParticipants?durable='true'";
+var queueName = "direct://amq.direct//varNumOfParticipantsSsl?durable='true'";
 
-var numbersOfProducers = [1, 2, 5, 10];
-var numbersOfConsumers = [1, 2, 5, 10];
+var numbersOfProducers = [1, 2, 5, 10, 20];
+var numbersOfConsumers = [1, 2, 5, 10, 20];
 
 for(producersIndex=0; producersIndex < numbersOfProducers.length; producersIndex++)
 {
@@ -54,7 +54,7 @@ for(producersIndex=0; producersIndex < n
               "_connections":[
                 {
                   "_name": "connection1",
-                  "_factory": "connectionfactory",
+                  "_factory": "sslconnectionfactory",
                   "_sessions": [
                     {
                       "_sessionName": "session1",
@@ -79,7 +79,7 @@ for(producersIndex=0; producersIndex < n
               "_connections":[
                 {
                   "_name": "connection1",
-                  "_factory": "connectionfactory",
+                  "_factory": "sslconnectionfactory",
                   "_sessions": [
                     {
                       "_sessionName": "session1",



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message