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/12/20 18:32:50 UTC

svn commit: r1424600 - in /qpid/trunk/qpid/java/perftests: etc/chartdefs/ etc/testdefs/ visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/ visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/writer/ visualisation-jfc/src/t...

Author: kwall
Date: Thu Dec 20 17:32:49 2012
New Revision: 1424600

URL: http://svn.apache.org/viewvc?rev=1424600&view=rev
Log:
NO-JIRA: [Java Broker] Added new perf test script to test the varying consumer/producer batch size independently of the other. This simulates a use-case that has been problematic for previous Qpid versions.

Changed visualisation-jfc to allow the perf-test result summary page title to be specified from the command line.
Converted BatchSize script from JSON to Javascript.

Added:
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize-Equal.chartdef
      - copied, changed from r1424588, qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize.chartdef
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1031-BatchSize-Unequal.chartdef
    qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSize.js
    qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeConsumerVaries.js
    qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeProducerVaries.js
Removed:
    qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize.chartdef
    qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSize.json
Modified:
    qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/ChartingUtil.java
    qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/writer/ChartWriter.java
    qpid/trunk/qpid/java/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java

Copied: qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize-Equal.chartdef (from r1424588, qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize.chartdef)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize-Equal.chartdef?p2=qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize-Equal.chartdef&p1=qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize.chartdef&r1=1424588&r2=1424600&rev=1424600&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize.chartdef (original)
+++ qpid/trunk/qpid/java/perftests/etc/chartdefs/1030-BatchSize-Equal.chartdef Thu Dec 20 17:32:49 2012
@@ -4,35 +4,34 @@
 # 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
+# '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
+# '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.
 #
 
 chartType=XYLINE
-chartTitle=Transaction Batch Size
+chartTitle=Transaction Batch Sizes Equal
 chartSubtitle=Persistent 1KB messages
-chartDescription=1P 1C, persistent, transacted with message payload 1KB and batch sizes 1-100 messages
+chartDescription=1P 1C, persistent, transacted with message payload 1KB with producer/consumer batch size varying between 1-400 messages for both P and C
 
 xAxisTitle=Batch Size
 yAxisTitle=Throughput (messages/s)
 
 series.1.statement=SELECT batchSize, throughputMessagesPerS FROM BatchSize WHERE participantName = 'All'
-series.1.legend=Current
+series.1.legend=Equal Producer/Consumer
 series.1.dir=${csvCurrentDir}
 series.1.colourName=red
 
 series.2.statement=SELECT batchSize, throughputMessagesPerS FROM BatchSize WHERE participantName = 'All'
-series.2.legend=Baseline
+series.2.legend=Equal Producer/Consumer (Baseline)
 series.2.dir=${csvBaselineDir}
 series.2.colourName=dark_red
 series.2.strokeWidth=-1
-

Added: qpid/trunk/qpid/java/perftests/etc/chartdefs/1031-BatchSize-Unequal.chartdef
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/chartdefs/1031-BatchSize-Unequal.chartdef?rev=1424600&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/chartdefs/1031-BatchSize-Unequal.chartdef (added)
+++ qpid/trunk/qpid/java/perftests/etc/chartdefs/1031-BatchSize-Unequal.chartdef Thu Dec 20 17:32:49 2012
@@ -0,0 +1,53 @@
+#
+# 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.
+#
+
+chartType=XYLINE
+chartTitle=Transaction Batch Size Unequal
+chartSubtitle=Persistent 1KB messages
+chartDescription=1P 1C, persistent, transacted with message payload 1KB with fixed batch size 1 for one party whilst other varies between 1-400 messages
+
+xAxisTitle=Batch Size
+yAxisTitle=Throughput (messages/s)
+
+#
+# If csvjdbc could do sub-selects (allowing us to extract the consumer/producer batch size from the All Consumers/All Producers rows),
+# we would not need the workaround where we have testdef place the consumer/producer batch size into testName field
+#
+
+series.1.statement=SELECT testName, throughputMessagesPerS FROM BatchSizeProducerVaries WHERE participantName = 'All'
+series.1.legend=Variable Producer, Fixed Consumer
+series.1.dir=${csvCurrentDir}
+series.1.colourName=red
+
+series.2.statement=SELECT testName, throughputMessagesPerS FROM BatchSizeProducerVaries WHERE participantName = 'All'
+series.2.legend=Variable Producer, Fixed Consumer (Baseline)
+series.2.dir=${csvBaselineDir}
+series.2.colourName=dark_red
+series.2.strokeWidth=-1
+
+series.3.statement=SELECT testName, throughputMessagesPerS FROM BatchSizeConsumerVaries WHERE participantName = 'All'
+series.3.legend=Fixed Producer, Variable Consumer
+series.3.dir=${csvCurrentDir}
+series.3.colourName=blue
+
+series.4.statement=SELECT testName, throughputMessagesPerS FROM BatchSizeConsumerVaries WHERE participantName = 'All'
+series.4.legend=Fixed Producer, Variable Consumer (Baseline)
+series.4.dir=${csvBaselineDir}
+series.4.colourName=dark_blue
+series.4.strokeWidth=-1

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSize.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSize.js?rev=1424600&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSize.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSize.js Thu Dec 20 17:32:49 2012
@@ -0,0 +1,102 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+var jsonObject = {
+    _tests:[]
+};
+
+var duration = 30000;
+
+var txBatchSizes = [[1,1], [2,2], [5,5], [10,10], [20,20], [50,50], [100,100], [200,200], [400,400]];
+
+var acknowledgeMode = 0;
+var deliveryMode = 2;
+var messageSize = 1024;
+
+for(i=0; i < txBatchSizes.length ; i++)
+{
+    var producerBatchSize = txBatchSizes[i][0];
+    var consumerBatchSize = txBatchSizes[i][1];
+    var queueName = "txBatchSize" + producerBatchSize + "_" + consumerBatchSize;
+    var destination = "direct://amq.direct//" + queueName + "?durable='true'";
+
+    var test = {
+      "_name": "Batch Size " + producerBatchSize + "-" + consumerBatchSize + " - PERSISTENT",
+      "_queues":[
+        {
+          "_name": queueName,
+          "_durable": true
+        }
+      ],
+      "_clients":[
+        {
+          "_name": "producingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_acknowledgeMode": acknowledgeMode,
+                  "_producers": [
+                    {
+                      "_name": "Producer1",
+                      "_destinationName": destination,
+                      "_messageSize": messageSize,
+                      "_deliveryMode": deliveryMode,
+                      "_batchSize": producerBatchSize,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+        {
+          "_name": "consumingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_acknowledgeMode": acknowledgeMode,
+                  "_consumers": [
+                    {
+                      "_name": "Consumer1",
+                      "_destinationName": destination,
+                      "_batchSize": consumerBatchSize,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    };
+
+    jsonObject._tests= jsonObject._tests.concat(test);
+}

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeConsumerVaries.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeConsumerVaries.js?rev=1424600&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeConsumerVaries.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeConsumerVaries.js Thu Dec 20 17:32:49 2012
@@ -0,0 +1,102 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+var jsonObject = {
+    _tests:[]
+};
+
+var duration = 30000;
+
+var txBatchSizes = [[1,1], [1,2], [1,5], [1,10], [1,20], [1,50], [1,100], [1,200], [1,400]];
+
+var acknowledgeMode = 0;
+var deliveryMode = 2;
+var messageSize = 1024;
+
+for(i=0; i < txBatchSizes.length ; i++)
+{
+    var producerBatchSize = txBatchSizes[i][0];
+    var consumerBatchSize = txBatchSizes[i][1];
+    var queueName = "txBatchSize" + producerBatchSize + "_" + consumerBatchSize;
+    var destination = "direct://amq.direct//" + queueName + "?durable='true'";
+
+    var test = {
+      "_name": consumerBatchSize,// hack - use test name to expose the consumer batch size on the All result rows
+      "_queues":[
+        {
+          "_name": queueName,
+          "_durable": true
+        }
+      ],
+      "_clients":[
+        {
+          "_name": "producingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_acknowledgeMode": acknowledgeMode,
+                  "_producers": [
+                    {
+                      "_name": "Producer1",
+                      "_destinationName": destination,
+                      "_messageSize": messageSize,
+                      "_deliveryMode": deliveryMode,
+                      "_batchSize": producerBatchSize,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+        {
+          "_name": "consumingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_acknowledgeMode": acknowledgeMode,
+                  "_consumers": [
+                    {
+                      "_name": "Consumer1",
+                      "_destinationName": destination,
+                      "_batchSize": consumerBatchSize,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    };
+
+    jsonObject._tests= jsonObject._tests.concat(test);
+}

Added: qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeProducerVaries.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeProducerVaries.js?rev=1424600&view=auto
==============================================================================
--- qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeProducerVaries.js (added)
+++ qpid/trunk/qpid/java/perftests/etc/testdefs/BatchSizeProducerVaries.js Thu Dec 20 17:32:49 2012
@@ -0,0 +1,102 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+var jsonObject = {
+    _tests:[]
+};
+
+var duration = 30000;
+
+var txBatchSizes = [[1,1], [2,1], [5,1], [10,1], [20,1], [50,1], [100,1], [200,1], [400,1]];
+
+var acknowledgeMode = 0;
+var deliveryMode = 2;
+var messageSize = 1024;
+
+for(i=0; i < txBatchSizes.length ; i++)
+{
+    var producerBatchSize = txBatchSizes[i][0];
+    var consumerBatchSize = txBatchSizes[i][1];
+    var queueName = "txBatchSize" + producerBatchSize + "_" + consumerBatchSize;
+    var destination = "direct://amq.direct//" + queueName + "?durable='true'";
+
+    var test = {
+      "_name": producerBatchSize,// hack - use test name to expose the producer batch size on the All result rows
+      "_queues":[
+        {
+          "_name": queueName,
+          "_durable": true
+        }
+      ],
+      "_clients":[
+        {
+          "_name": "producingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_acknowledgeMode": acknowledgeMode,
+                  "_producers": [
+                    {
+                      "_name": "Producer1",
+                      "_destinationName": destination,
+                      "_messageSize": messageSize,
+                      "_deliveryMode": deliveryMode,
+                      "_batchSize": producerBatchSize,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+        {
+          "_name": "consumingClient",
+          "_connections":[
+            {
+              "_name": "connection1",
+              "_factory": "connectionfactory",
+              "_sessions": [
+                {
+                  "_sessionName": "session1",
+                  "_acknowledgeMode": acknowledgeMode,
+                  "_consumers": [
+                    {
+                      "_name": "Consumer1",
+                      "_destinationName": destination,
+                      "_batchSize": consumerBatchSize,
+                      "_maximumDuration": duration
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    };
+
+    jsonObject._tests= jsonObject._tests.concat(test);
+}

Modified: qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/ChartingUtil.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/ChartingUtil.java?rev=1424600&r1=1424599&r2=1424600&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/ChartingUtil.java (original)
+++ qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/ChartingUtil.java Thu Dec 20 17:32:49 2012
@@ -58,10 +58,14 @@ public class ChartingUtil
     public static final String CHART_DEFINITIONS_PROP = "chart-defs";
     public static final String CHART_DEFINITIONS_DEFAULT = ".";
 
+    public static final String SUMMARY_TITLE_PROP = "summary-title";
+    public static final String SUMMARY_TITLE_DEFAULT = "Performance Charts";
+
     private Map<String,String> _cliOptions = new HashMap<String, String>();
     {
         _cliOptions.put(OUTPUT_DIR_PROP, OUTPUT_DIR_DEFAULT);
         _cliOptions.put(CHART_DEFINITIONS_PROP, CHART_DEFINITIONS_DEFAULT);
+        _cliOptions.put(SUMMARY_TITLE_PROP, SUMMARY_TITLE_DEFAULT);
     }
 
     public static void main(String[] args) throws Exception
@@ -101,7 +105,8 @@ public class ChartingUtil
             writer.writeChartToFileSystem(chart, chartingDefinition);
         }
 
-        writer.writeHtmlSummaryToFileSystem();
+        final String summaryChartTitle = _cliOptions.get(SUMMARY_TITLE_PROP);
+        writer.writeHtmlSummaryToFileSystem(summaryChartTitle);
     }
 
     private List<ChartingDefinition> loadChartDefinitions(String chartingDefsDir)

Modified: qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/writer/ChartWriter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/writer/ChartWriter.java?rev=1424600&r1=1424599&r2=1424600&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/writer/ChartWriter.java (original)
+++ qpid/trunk/qpid/java/perftests/visualisation-jfc/src/main/java/org/apache/qpid/disttest/charting/writer/ChartWriter.java Thu Dec 20 17:32:49 2012
@@ -79,7 +79,7 @@ public class ChartWriter
         }
     }
 
-    public void writeHtmlSummaryToFileSystem()
+    public void writeHtmlSummaryToFileSystem(String summaryPageTitle)
     {
         if(_chartFilesToChartDef.size() < 2)
         {
@@ -87,13 +87,13 @@ public class ChartWriter
             return;
         }
 
-        String htmlHeader =
+        String htmlHeader = String.format(
             "<html>\n" +
             "    <head>\n" +
-            "        <title>Performance Charts</title>\n" +
+            "        <title>%s</title>\n" +
             "        <style type='text/css'>figure { float: left; display: table; width: 87px;}</style>\n" +
             "    </head>\n" +
-            "    <body>\n";
+            "    <body>\n", summaryPageTitle);
 
         String htmlFooter =
             "    </body>\n" +

Modified: qpid/trunk/qpid/java/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java?rev=1424600&r1=1424599&r2=1424600&view=diff
==============================================================================
--- qpid/trunk/qpid/java/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java (original)
+++ qpid/trunk/qpid/java/perftests/visualisation-jfc/src/test/java/org/apache/qpid/disttest/charting/writer/ChartWriterTest.java Thu Dec 20 17:32:49 2012
@@ -91,7 +91,7 @@ public class ChartWriterTest extends Tes
         _writer.writeChartToFileSystem(_chart2, chartDef2);
         _writer.writeChartToFileSystem(_chart1, chartDef1);
 
-        _writer.writeHtmlSummaryToFileSystem();
+        _writer.writeHtmlSummaryToFileSystem("Performance Charts");
 
         InputStream expectedSummaryFileInputStream = getClass().getResourceAsStream("expected-chart-summary.html");
         String expectedSummaryContent = new Scanner(expectedSummaryFileInputStream).useDelimiter("\\A").next();
@@ -110,7 +110,7 @@ public class ChartWriterTest extends Tes
 
         _writer.writeChartToFileSystem(_chart1, chartDef1);
 
-        _writer.writeHtmlSummaryToFileSystem();
+        _writer.writeHtmlSummaryToFileSystem("Performance Charts");
 
         assertFalse("Only one chart generated so no summary file should have been written",
                 summaryFile.exists());



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