You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ra...@apache.org on 2008/12/19 01:53:58 UTC
svn commit: r727872 [5/7] - in /qpid/trunk/qpid/dotnet/client-010: ./
addins/ExcelAddIn/ addins/ExcelAddIn/Properties/
addins/ExcelAddInMessageProcessor/
addins/ExcelAddInMessageProcessor/Properties/ addins/ExcelAddInProducer/
addins/ExcelAddInProducer...
Modified: qpid/trunk/qpid/dotnet/client-010/log.xml
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/log.xml?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/log.xml (original)
+++ qpid/trunk/qpid/dotnet/client-010/log.xml Thu Dec 18 16:53:56 2008
@@ -1,26 +1,46 @@
-<log4net>
- <appender name="Console" type="log4net.Appender.ConsoleAppender">
- <layout type="log4net.Layout.PatternLayout">
- <!-- Pattern to output the caller's file name and line number -->
- <conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" />
- </layout>
- </appender>
-
- <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
- <file value="logs/mylogfile.log" />
- <appendToFile value="true" />
- <maximumFileSize value="8192KB" />
- <maxSizeRollBackups value="2" />
-
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level %ndc - %message%newline" />
- <!--<conversionPattern value="%level %thread %logger - %message%newline" />-->
- </layout>
- </appender>
-
- <root>
- <level value="DEBUG" />
- <appender-ref ref="Console" />
- <appender-ref ref="RollingFile" />
- </root>
-</log4net>
+<!--
+
+ 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.
+
+-->
+<log4net>
+ <appender name="Console" type="log4net.Appender.ConsoleAppender">
+ <layout type="log4net.Layout.PatternLayout">
+ <!-- Pattern to output the caller's file name and line number -->
+ <conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" />
+ </layout>
+ </appender>
+
+ <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
+ <file value="logs/mylogfile.log" />
+ <appendToFile value="true" />
+ <maximumFileSize value="8192KB" />
+ <maxSizeRollBackups value="2" />
+
+ <layout type="log4net.Layout.PatternLayout">
+ <conversionPattern value="%date [%thread] %-5level %ndc - %message%newline" />
+ <!--<conversionPattern value="%level %thread %logger - %message%newline" />-->
+ </layout>
+ </appender>
+
+ <root>
+ <level value="DEBUG" />
+ <appender-ref ref="Console" />
+ <appender-ref ref="RollingFile" />
+ </root>
+</log4net>
Modified: qpid/trunk/qpid/dotnet/client-010/perftest/PerfTest.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/perftest/PerfTest.cs?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/perftest/PerfTest.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/perftest/PerfTest.cs Thu Dec 18 16:53:56 2008
@@ -1,684 +1,705 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Threading;
-using common.org.apache.qpid.transport.util;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-using Plossum.CommandLine;
-
-namespace PerfTest
-{
- [CommandLineManager(ApplicationName = "Qpid Perf Tests", Copyright = "Apache Software Foundation")]
- public class Options
- {
- [CommandLineOption(Description = "Displays this help text")] public bool Help;
-
- [CommandLineOption(Description = "Create shared queues.", MinOccurs = 0)] public Boolean Setup;
-
- [CommandLineOption(Description = "Run test, print report.", MinOccurs = 0)] public Boolean Control;
-
- [CommandLineOption(Description = "Publish messages.", MinOccurs = 0)] public Boolean Publish;
-
- [CommandLineOption(Description = "Subscribe for messages.", MinOccurs = 0)] public Boolean Subscribe;
-
- [CommandLineOption(Description = "Test mode: [shared|fanout|topic]", MinOccurs = 0)]
- public string Mode
- {
- get { return _mMode; }
- set
- {
- if (! value.Equals("shared") && ! value.Equals("fanout") && ! value.Equals("topic"))
- throw new InvalidOptionValueException(
- "The mode must not be shared|fanout|topic", false);
- _mMode = value;
- }
- }
-
- private string _mMode = "shared";
-
- [CommandLineOption(Description = "Specifies the broler name", MinOccurs = 0)]
- public string Broker
- {
- get { return _broker; }
- set
- {
- if (String.IsNullOrEmpty(value))
- throw new InvalidOptionValueException(
- "The broker name must not be empty", false);
- _broker = value;
- }
- }
-
- private string _broker = "localhost";
-
- [CommandLineOption(Description = "Specifies the port name", MinOccurs = 0)]
- public int Port
- {
- get { return _port; }
- set { _port = value; }
- }
-
- private int _port = 5672;
-
- #region Publisher
-
- [CommandLineOption(Description = "Create N publishers.", MinOccurs = 0)]
- public int Pubs
- {
- get { return _pubs; }
- set { _pubs = value; }
- }
-
- private int _pubs = 1;
-
- [CommandLineOption(Description = "Each publisher sends N messages.", MinOccurs = 0)]
- public double Count
- {
- get { return _count; }
- set { _count = value; }
- }
-
- private double _count = 5000;
-
- [CommandLineOption(Description = "Size of messages in bytes.", MinOccurs = 0)]
- public long Size
- {
- get { return _size; }
- set { _size = value; }
- }
-
- private long _size = 1024;
-
- [CommandLineOption(Description = "Publisher use confirm-mode.", MinOccurs = 0)] public Boolean Confirm = true;
-
- [CommandLineOption(Description = "Publish messages as durable.", MinOccurs = 0)] public Boolean Durable;
-
- [CommandLineOption(Description = "Make data for each message unique.", MinOccurs = 0)] public Boolean UniqueData;
-
- [CommandLineOption(Description = "Wait for confirmation of each message before sending the next one.",
- MinOccurs = 0)] public Boolean SyncPub;
-
- [CommandLineOption(Description = ">=0 delay between msg publish.", MinOccurs = 0)]
- public double IntervalPub
- {
- get { return _interval_pub; }
- set { _interval_pub = value; }
- }
-
- private double _interval_pub;
-
- #endregion
-
- #region Subscriber
-
- [CommandLineOption(Description = "Create N subscribers.", MinOccurs = 0)]
- public int Subs
- {
- get { return _subs; }
- set { _subs = value; }
- }
-
- private int _subs = 1;
-
- [CommandLineOption(Description = "N>0: Subscriber acks batches of N.\n N==0: Subscriber uses unconfirmed mode",
- MinOccurs = 0)]
- public int SubAck
- {
- get { return _suback; }
- set { _suback = value; }
- }
-
- private int _suback;
-
- [CommandLineOption(Description = ">=0 delay between msg consume", MinOccurs = 0)]
- public double IntervalSub
- {
- get { return _interval_sub; }
- set { _interval_sub = value; }
- }
-
- private double _interval_sub;
-
- #endregion
-
- [CommandLineOption(Description = "Create N queues.", MinOccurs = 0)]
- public int Queues
- {
- get { return _qt; }
- set { _qt = value; }
- }
-
- private int _qt = 1;
-
- [CommandLineOption(Description = "Desired number of iterations of the test.", MinOccurs = 0)]
- public int Iterations
- {
- get { return _iterations; }
- set { _iterations = value; }
- }
-
- private int _iterations = 1;
-
- [CommandLineOption(Description = "If non-zero, the transaction batch size.", MinOccurs = 0)]
- public int Tx
- {
- get { return _tx; }
- set { _tx = value; }
- }
-
- private int _tx;
-
- [CommandLineOption(Description = "Make queue durable (implied if durable set.", MinOccurs = 0)] public Boolean
- QueueDurable;
-
- [CommandLineOption(Description = "Queue policy: count to trigger 'flow to disk'", MinOccurs = 0)]
- public double QueueMaxCount
- {
- get { return _queueMaxCount; }
- set { _queueMaxCount = value; }
- }
-
- private double _queueMaxCount;
-
- [CommandLineOption(Description = "Queue policy: accumulated size to trigger 'flow to disk'", MinOccurs = 0)]
- public double QueueMaxSize
- {
- get { return _queueMaxSize; }
- set { _queueMaxSize = value; }
- }
-
- private double _queueMaxSize;
-
- public double SubQuota
- {
- get { return _subQuota; }
- set { _subQuota = value; }
- }
-
- private double _subQuota;
- }
-
- internal interface Startable
- {
- void Start();
- }
-
- public abstract class PerfTestClient : Startable
- {
- private readonly Client _connection;
- private readonly ClientSession _session;
- private readonly Options _options;
-
- public ClientSession Session
- {
- get { return _session; }
- }
-
- public Options Options
- {
- get { return _options; }
- }
-
- protected PerfTestClient(Options options)
- {
- _options = options;
- _connection = new Client();
- _connection.connect(options.Broker, options.Port, "test", "guest", "guest");
- _session = _connection.createSession(50000);
- }
-
- public abstract void Start();
- }
-
- public class SetupTest : PerfTestClient
- {
- public SetupTest(Options options)
- : base(options)
- {
- }
-
- private void queueInit(String name, Boolean durable, Dictionary<String, Object> arguments)
- {
- Session.queueDeclare(name, null, arguments, durable ? Option.DURABLE : Option.NONE);
- Session.queuePurge(name);
- Session.exchangeBind(name, "amq.direct", name);
- Session.sync();
- }
-
- public override void Start()
- {
- queueInit("pub_start", false, null);
- queueInit("pub_done", false, null);
- queueInit("sub_ready", false, null);
- queueInit("sub_done", false, null);
- if (Options.Mode.Equals("shared"))
- {
- Dictionary<String, Object> settings = new Dictionary<string, object>();
- if (Options.QueueMaxCount > 0)
- settings.Add("qpid.max_count", Options.QueueMaxCount);
- if (Options.QueueMaxSize > 0)
- settings.Add("qpid.max_size", Options.QueueMaxSize);
- for (int i = 0; i < Options.Queues; ++i)
- {
- string qname = "perftest" + i;
- queueInit(qname, Options.Durable || Options.QueueDurable, settings);
- }
- }
- }
- }
-
- public class SubscribeThread : PerfTestClient
- {
- private readonly string _queue;
-
- public SubscribeThread(Options options, string key, string exchange)
- : base(options)
- {
- _queue = "perftest" + (new UUID(10, 10)).ToString();
- Session.queueDeclare(_queue, null, null, Option.EXCLUSIVE, Option.AUTO_DELETE,
- Options.Durable ? Option.DURABLE : Option.NONE);
- Session.exchangeBind(_queue, exchange, key);
- }
-
- public SubscribeThread(Options options, string key)
- : base(options)
- {
- _queue = key;
- }
-
- public override void Start()
- {
- if (Options.Tx > 0)
- {
- Session.txSelect();
- Session.sync();
- }
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- // Create a listener and subscribe it to the queue named "message_queue"
- IMessageListener listener = new SyncListener(buffer);
- string dest = "dest" + UUID.randomUUID().ToString();
- Session.attachMessageListener(listener, dest);
- Session.messageSubscribe(_queue, dest,
- Options.Tx > 0 || Options.SubAck > 0
- ? MessageAcceptMode.EXPLICIT
- : MessageAcceptMode.NONE,
- MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
- // issue credits
- Session.messageSetFlowMode(dest, MessageFlowMode.WINDOW);
- Session.messageFlow(dest, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-
- // Notify controller we are ready.
- IMessage message = new Message();
- message.DeliveryProperties.setRoutingKey("sub_ready");
-
- message.appendData(Encoding.UTF8.GetBytes("ready"));
- Session.messageTransfer("amq.direct", message);
-
- if (Options.Tx > 0)
- {
- Session.txCommit();
- Session.sync();
- }
-
-
- for (int j = 0; j < Options.Iterations; ++j)
- {
-
- //need to allocate some more credit
- Session.messageFlow(dest, MessageCreditUnit.MESSAGE, (long)Options.SubQuota);
-
- RangeSet range = new RangeSet();
- IMessage msg;
- DateTime start = DateTime.Now;
- for (long i = 0; i < Options.SubQuota; ++i)
- {
- msg = buffer.Dequeue();
- if (Options.Tx > 0 && ((i + 1)%Options.Tx == 0))
- {
- Session.txCommit();
- Session.sync();
- }
- if (Options.IntervalSub > 0)
- {
- Thread.Sleep((int) Options.IntervalSub*1000);
- }
- range.add(msg.Id);
- }
- if (Options.Tx > 0 || Options.SubAck > 0)
- Session.messageAccept(range);
- range.clear();
- if (Options.Tx > 0)
- {
- Session.txSelect();
- Session.sync();
- }
- DateTime end = DateTime.Now;
-
- // Report to publisher.
- message.DeliveryProperties.setRoutingKey("sub_done");
- message.clearData();
- message.appendData(BitConverter.GetBytes(Options.SubQuota / end.Subtract(start).TotalMilliseconds ));
- Session.messageTransfer("amq.direct", message);
- if (Options.Tx > 0)
- {
- Session.txSelect();
- Session.sync();
- }
- }
- Session.close();
- }
- }
-
- public class SyncListener : IMessageListener
- {
- private readonly CircularBuffer<IMessage> _buffer;
-
- public SyncListener(CircularBuffer<IMessage> buffer)
- {
- _buffer = buffer;
- }
-
- public void messageTransfer(IMessage m)
- {
- _buffer.Enqueue(m);
- }
- }
-
-
- public class PublishThread : PerfTestClient
- {
- private readonly string _exchange;
- private readonly string _key;
-
- public PublishThread(Options options, string key, string exchange)
- : base(options)
- {
- _key = key;
- _exchange = exchange;
- }
-
-
- public override void Start()
- {
- byte[] data = new byte[Options.Size];
- // randomly populate data
- Random r = new Random(34);
- r.NextBytes(data);
- IMessage message = new Message();
- message.appendData(data);
-
- message.DeliveryProperties.setRoutingKey(_key);
-
- if (Options.Durable)
- message.DeliveryProperties.setDeliveryMode(MessageDeliveryMode.PERSISTENT);
-
- if (Options.Tx > 0)
- {
- Session.txSelect();
- Session.sync();
- }
-
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- // Create a listener and subscribe it to the queue named "pub_start"
- IMessageListener listener = new SyncListener(buffer);
- string localQueue = "localQueue-" + UUID.randomUUID().ToString();
- Session.queueDeclare(localQueue, null, null, Option.AUTO_DELETE);
- Session.exchangeBind(localQueue, "amq.direct", "pub_start");
- Session.attachMessageListener(listener, localQueue);
- Session.messageSubscribe(localQueue);
- if (Options.Tx > 0)
- {
- Session.txCommit();
- Session.sync();
- }
- buffer.Dequeue();
-
- for (int j = 0; j < Options.Iterations; ++j)
- {
- DateTime start = DateTime.Now;
- for (long i = 0; i < Options.Count; ++i)
- {
- Session.messageTransfer(_exchange, message);
-
- if (Options.SyncPub)
- {
- Session.sync();
- }
- if (Options.Tx > 0 && (i + 1)%Options.Tx == 0)
- {
- Session.txSelect();
- Session.sync();
- }
- if (Options.IntervalPub > 0)
- {
- Thread.Sleep((int) Options.IntervalSub*1000);
- }
- }
- Session.sync();
- DateTime end = DateTime.Now;
-
- // Report to publisher.
- message.DeliveryProperties.setRoutingKey("pub_done");
- message.clearData();
- double time = end.Subtract(start).TotalMilliseconds;
- byte[] rate = BitConverter.GetBytes( Options.Count / time );
- message.appendData(rate);
- Session.messageTransfer("amq.direct", message);
- if (Options.Tx > 0)
- {
- Session.txSelect();
- Session.sync();
- }
- }
- Session.close();
- }
- }
-
- public class Controller : PerfTestClient
- {
- public Controller(Options options)
- : base(options)
- {
- }
-
- private void process(int size, string queue)
- {
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- IMessageListener listener = new SyncListener(buffer);
- string localQueue = "queue-" + UUID.randomUUID().ToString();
- Session.queueDeclare(localQueue, null, null, Option.AUTO_DELETE);
- Session.exchangeBind(localQueue, "amq.direct", queue);
- Session.attachMessageListener(listener, localQueue);
- Session.messageSubscribe(localQueue);
- for (int i = 0; i < size; ++i)
- {
- buffer.Dequeue();
- }
- }
-
- private double processRate(int size, string queue)
- {
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- IMessageListener listener = new SyncListener(buffer);
- string localQueue = "queue-" + UUID.randomUUID().ToString();
- Session.queueDeclare(localQueue, null, null, Option.AUTO_DELETE);
- Session.exchangeBind(localQueue, "amq.direct", queue);
- Session.attachMessageListener(listener, localQueue);
- Session.messageSubscribe(localQueue);
- double rate = 0;
- RangeSet range = new RangeSet();
- for (int i = 0; i < size; ++i)
- {
- IMessage m = buffer.Dequeue();
- range.add(m.Id);
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- rate += BitConverter.ToDouble(body,0);
- }
- Session.messageAccept(range);
- return rate;
- }
-
- private void send(int size, string queue, string data)
- {
- IMessage message = new Message();
- message.DeliveryProperties.setRoutingKey(queue);
- message.appendData(Encoding.UTF8.GetBytes(data));
- for (int i = 0; i < size; ++i)
- {
- Session.messageTransfer("amq.direct", message);
- }
- }
-
- public override void Start()
- {
- process(Options.Subs, "sub_ready");
- for (int j = 0; j < Options.Iterations; ++j)
- {
- DateTime start = DateTime.Now;
- send(Options.Pubs, "pub_start", "start"); // Start publishers
- double pubrate = processRate(Options.Pubs, "pub_done");
- double subrate = processRate(Options.Subs, "sub_done");
- DateTime end = DateTime.Now;
-
- double transfers = (Options.Pubs*Options.Count) + (Options.Subs*Options.SubQuota);
- double time = end.Subtract(start).TotalSeconds;
- double txrate = transfers/time;
- double mbytes = (txrate*Options.Size) / (1024 * 1024) ;
-
- Console.WriteLine("Total: " + transfers + " transfers of " + Options.Size + " bytes in "
- + time + " seconds.\n" +
- "Publish transfers/sec: " + pubrate * 1000 + "\n" +
- "Subscribe transfers/sec: " + subrate * 1000 + "\n" +
- "Total transfers/sec: " + txrate + "\n" +
- "Total Mbytes/sec: " + mbytes);
- Console.WriteLine("done");
- }
-
- }
- }
-
-
- public class PerfTest
- {
- private static int Main(string[] args)
- {
- Options options = new Options();
- CommandLineParser parser = new CommandLineParser(options);
- parser.Parse();
- if (parser.HasErrors)
- {
- Console.WriteLine(parser.UsageInfo.GetErrorsAsString(78));
- return -1;
- }
- if (options.Help)
- {
- Console.WriteLine(parser.UsageInfo.GetOptionsAsString(78));
- return 0;
- }
- bool singleProcess =
- (!options.Setup && !options.Control && !options.Publish && !options.Subscribe);
- if (singleProcess)
- {
- options.Setup = options.Control = options.Publish = true;
- options.Subscribe = true;
- }
-
-
- string exchange = "amq.direct";
- switch (options.Mode)
- {
- case "shared":
- options.SubQuota = (options.Pubs*options.Count)/options.Subs;
- break;
- case "fanout":
- options.SubQuota = (options.Pubs*options.Count);
- exchange = "amq.fanout";
- break;
- case "topic":
- options.SubQuota = (options.Pubs*options.Count);
- exchange = "amq.topic";
- break;
- }
-
- if (options.Setup)
- {
- SetupTest setup = new SetupTest(options);
- setup.Start(); // Set up queues
- }
-
- Thread contT = null;
- if ( options.Control)
- {
- Controller c = new Controller(options);
- contT = new Thread(c.Start);
- contT.Start();
- }
-
- Thread[] publishers = null;
- Thread[] subscribers = null;
-
- // Start pubs/subs for each queue/topic.
- for (int i = 0; i < options.Queues; ++i)
- {
- string key = "perftest" + i; // Queue or topic name.
- if (options.Publish)
- {
- int n = singleProcess ? options.Pubs : 1;
- publishers = new Thread[n];
- for (int j = 0; j < n; ++j)
- {
- PublishThread pt = new PublishThread(options, key, exchange);
- publishers[i] = new Thread(pt.Start);
- publishers[i].Start();
- }
- }
- if ( options.Subscribe)
- {
- int n = singleProcess ? options.Subs : 1;
- subscribers = new Thread[n];
- for (int j = 0; j < n; ++j)
- {
- SubscribeThread st;
- if (options.Mode.Equals("shared"))
- st = new SubscribeThread(options, key);
- else
- st = new SubscribeThread(options, key, exchange);
- subscribers[i] = new Thread(st.Start);
- subscribers[i].Start();
- }
- }
- }
-
- if (options.Control)
- {
- contT.Join();
- }
-
-
- // Wait for started threads.
- if (options.Publish)
- {
- foreach (Thread t in publishers)
- {
- t.Join();
- }
- }
-
- if (options.Subscribe)
- {
- foreach (Thread t in subscribers)
- {
- t.Join();
- }
- }
-
-
- return 0;
- }
- }
-}
+/*
+ *
+ * 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.
+ *
+ */
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+using System.Threading;
+using common.org.apache.qpid.transport.util;
+using org.apache.qpid.client;
+using org.apache.qpid.transport;
+using org.apache.qpid.transport.util;
+using Plossum.CommandLine;
+
+namespace PerfTest
+{
+ [CommandLineManager(ApplicationName = "Qpid Perf Tests", Copyright = "Apache Software Foundation")]
+ public class Options
+ {
+ [CommandLineOption(Description = "Displays this help text")] public bool Help;
+
+ [CommandLineOption(Description = "Create shared queues.", MinOccurs = 0)] public Boolean Setup;
+
+ [CommandLineOption(Description = "Run test, print report.", MinOccurs = 0)] public Boolean Control;
+
+ [CommandLineOption(Description = "Publish messages.", MinOccurs = 0)] public Boolean Publish;
+
+ [CommandLineOption(Description = "Subscribe for messages.", MinOccurs = 0)] public Boolean Subscribe;
+
+ [CommandLineOption(Description = "Test mode: [shared|fanout|topic]", MinOccurs = 0)]
+ public string Mode
+ {
+ get { return _mMode; }
+ set
+ {
+ if (! value.Equals("shared") && ! value.Equals("fanout") && ! value.Equals("topic"))
+ throw new InvalidOptionValueException(
+ "The mode must not be shared|fanout|topic", false);
+ _mMode = value;
+ }
+ }
+
+ private string _mMode = "shared";
+
+ [CommandLineOption(Description = "Specifies the broler name", MinOccurs = 0)]
+ public string Broker
+ {
+ get { return _broker; }
+ set
+ {
+ if (String.IsNullOrEmpty(value))
+ throw new InvalidOptionValueException(
+ "The broker name must not be empty", false);
+ _broker = value;
+ }
+ }
+
+ private string _broker = "localhost";
+
+ [CommandLineOption(Description = "Specifies the port name", MinOccurs = 0)]
+ public int Port
+ {
+ get { return _port; }
+ set { _port = value; }
+ }
+
+ private int _port = 5672;
+
+ #region Publisher
+
+ [CommandLineOption(Description = "Create N publishers.", MinOccurs = 0)]
+ public int Pubs
+ {
+ get { return _pubs; }
+ set { _pubs = value; }
+ }
+
+ private int _pubs = 1;
+
+ [CommandLineOption(Description = "Each publisher sends N messages.", MinOccurs = 0)]
+ public double Count
+ {
+ get { return _count; }
+ set { _count = value; }
+ }
+
+ private double _count = 5000;
+
+ [CommandLineOption(Description = "Size of messages in bytes.", MinOccurs = 0)]
+ public long Size
+ {
+ get { return _size; }
+ set { _size = value; }
+ }
+
+ private long _size = 1024;
+
+ [CommandLineOption(Description = "Publisher use confirm-mode.", MinOccurs = 0)] public Boolean Confirm = true;
+
+ [CommandLineOption(Description = "Publish messages as durable.", MinOccurs = 0)] public Boolean Durable;
+
+ [CommandLineOption(Description = "Make data for each message unique.", MinOccurs = 0)] public Boolean UniqueData;
+
+ [CommandLineOption(Description = "Wait for confirmation of each message before sending the next one.",
+ MinOccurs = 0)] public Boolean SyncPub;
+
+ [CommandLineOption(Description = ">=0 delay between msg publish.", MinOccurs = 0)]
+ public double IntervalPub
+ {
+ get { return _interval_pub; }
+ set { _interval_pub = value; }
+ }
+
+ private double _interval_pub;
+
+ #endregion
+
+ #region Subscriber
+
+ [CommandLineOption(Description = "Create N subscribers.", MinOccurs = 0)]
+ public int Subs
+ {
+ get { return _subs; }
+ set { _subs = value; }
+ }
+
+ private int _subs = 1;
+
+ [CommandLineOption(Description = "N>0: Subscriber acks batches of N.\n N==0: Subscriber uses unconfirmed mode",
+ MinOccurs = 0)]
+ public int SubAck
+ {
+ get { return _suback; }
+ set { _suback = value; }
+ }
+
+ private int _suback;
+
+ [CommandLineOption(Description = ">=0 delay between msg consume", MinOccurs = 0)]
+ public double IntervalSub
+ {
+ get { return _interval_sub; }
+ set { _interval_sub = value; }
+ }
+
+ private double _interval_sub;
+
+ #endregion
+
+ [CommandLineOption(Description = "Create N queues.", MinOccurs = 0)]
+ public int Queues
+ {
+ get { return _qt; }
+ set { _qt = value; }
+ }
+
+ private int _qt = 1;
+
+ [CommandLineOption(Description = "Desired number of iterations of the test.", MinOccurs = 0)]
+ public int Iterations
+ {
+ get { return _iterations; }
+ set { _iterations = value; }
+ }
+
+ private int _iterations = 1;
+
+ [CommandLineOption(Description = "If non-zero, the transaction batch size.", MinOccurs = 0)]
+ public int Tx
+ {
+ get { return _tx; }
+ set { _tx = value; }
+ }
+
+ private int _tx;
+
+ [CommandLineOption(Description = "Make queue durable (implied if durable set.", MinOccurs = 0)] public Boolean
+ QueueDurable;
+
+ [CommandLineOption(Description = "Queue policy: count to trigger 'flow to disk'", MinOccurs = 0)]
+ public double QueueMaxCount
+ {
+ get { return _queueMaxCount; }
+ set { _queueMaxCount = value; }
+ }
+
+ private double _queueMaxCount;
+
+ [CommandLineOption(Description = "Queue policy: accumulated size to trigger 'flow to disk'", MinOccurs = 0)]
+ public double QueueMaxSize
+ {
+ get { return _queueMaxSize; }
+ set { _queueMaxSize = value; }
+ }
+
+ private double _queueMaxSize;
+
+ public double SubQuota
+ {
+ get { return _subQuota; }
+ set { _subQuota = value; }
+ }
+
+ private double _subQuota;
+ }
+
+ internal interface Startable
+ {
+ void Start();
+ }
+
+ public abstract class PerfTestClient : Startable
+ {
+ private readonly Client _connection;
+ private readonly ClientSession _session;
+ private readonly Options _options;
+
+ public ClientSession Session
+ {
+ get { return _session; }
+ }
+
+ public Options Options
+ {
+ get { return _options; }
+ }
+
+ protected PerfTestClient(Options options)
+ {
+ _options = options;
+ _connection = new Client();
+ _connection.connect(options.Broker, options.Port, "test", "guest", "guest");
+ _session = _connection.createSession(50000);
+ }
+
+ public abstract void Start();
+ }
+
+ public class SetupTest : PerfTestClient
+ {
+ public SetupTest(Options options)
+ : base(options)
+ {
+ }
+
+ private void queueInit(String name, Boolean durable, Dictionary<String, Object> arguments)
+ {
+ Session.queueDeclare(name, null, arguments, durable ? Option.DURABLE : Option.NONE);
+ Session.queuePurge(name);
+ Session.exchangeBind(name, "amq.direct", name);
+ Session.sync();
+ }
+
+ public override void Start()
+ {
+ queueInit("pub_start", false, null);
+ queueInit("pub_done", false, null);
+ queueInit("sub_ready", false, null);
+ queueInit("sub_done", false, null);
+ if (Options.Mode.Equals("shared"))
+ {
+ Dictionary<String, Object> settings = new Dictionary<string, object>();
+ if (Options.QueueMaxCount > 0)
+ settings.Add("qpid.max_count", Options.QueueMaxCount);
+ if (Options.QueueMaxSize > 0)
+ settings.Add("qpid.max_size", Options.QueueMaxSize);
+ for (int i = 0; i < Options.Queues; ++i)
+ {
+ string qname = "perftest" + i;
+ queueInit(qname, Options.Durable || Options.QueueDurable, settings);
+ }
+ }
+ }
+ }
+
+ public class SubscribeThread : PerfTestClient
+ {
+ private readonly string _queue;
+
+ public SubscribeThread(Options options, string key, string exchange)
+ : base(options)
+ {
+ _queue = "perftest" + (new UUID(10, 10)).ToString();
+ Session.queueDeclare(_queue, null, null, Option.EXCLUSIVE, Option.AUTO_DELETE,
+ Options.Durable ? Option.DURABLE : Option.NONE);
+ Session.exchangeBind(_queue, exchange, key);
+ }
+
+ public SubscribeThread(Options options, string key)
+ : base(options)
+ {
+ _queue = key;
+ }
+
+ public override void Start()
+ {
+ if (Options.Tx > 0)
+ {
+ Session.txSelect();
+ Session.sync();
+ }
+ CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
+ // Create a listener and subscribe it to the queue named "message_queue"
+ IMessageListener listener = new SyncListener(buffer);
+ string dest = "dest" + UUID.randomUUID().ToString();
+ Session.attachMessageListener(listener, dest);
+ Session.messageSubscribe(_queue, dest,
+ Options.Tx > 0 || Options.SubAck > 0
+ ? MessageAcceptMode.EXPLICIT
+ : MessageAcceptMode.NONE,
+ MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
+ // issue credits
+ Session.messageSetFlowMode(dest, MessageFlowMode.WINDOW);
+ Session.messageFlow(dest, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
+
+ // Notify controller we are ready.
+ IMessage message = new Message();
+ message.DeliveryProperties.setRoutingKey("sub_ready");
+
+ message.appendData(Encoding.UTF8.GetBytes("ready"));
+ Session.messageTransfer("amq.direct", message);
+
+ if (Options.Tx > 0)
+ {
+ Session.txCommit();
+ Session.sync();
+ }
+
+
+ for (int j = 0; j < Options.Iterations; ++j)
+ {
+
+ //need to allocate some more credit
+ Session.messageFlow(dest, MessageCreditUnit.MESSAGE, (long)Options.SubQuota);
+
+ RangeSet range = new RangeSet();
+ IMessage msg;
+ DateTime start = DateTime.Now;
+ for (long i = 0; i < Options.SubQuota; ++i)
+ {
+ msg = buffer.Dequeue();
+ if (Options.Tx > 0 && ((i + 1)%Options.Tx == 0))
+ {
+ Session.txCommit();
+ Session.sync();
+ }
+ if (Options.IntervalSub > 0)
+ {
+ Thread.Sleep((int) Options.IntervalSub*1000);
+ }
+ range.add(msg.Id);
+ }
+ if (Options.Tx > 0 || Options.SubAck > 0)
+ Session.messageAccept(range);
+ range.clear();
+ if (Options.Tx > 0)
+ {
+ Session.txSelect();
+ Session.sync();
+ }
+ DateTime end = DateTime.Now;
+
+ // Report to publisher.
+ message.DeliveryProperties.setRoutingKey("sub_done");
+ message.clearData();
+ message.appendData(BitConverter.GetBytes(Options.SubQuota / end.Subtract(start).TotalMilliseconds ));
+ Session.messageTransfer("amq.direct", message);
+ if (Options.Tx > 0)
+ {
+ Session.txSelect();
+ Session.sync();
+ }
+ }
+ Session.close();
+ }
+ }
+
+ public class SyncListener : IMessageListener
+ {
+ private readonly CircularBuffer<IMessage> _buffer;
+
+ public SyncListener(CircularBuffer<IMessage> buffer)
+ {
+ _buffer = buffer;
+ }
+
+ public void messageTransfer(IMessage m)
+ {
+ _buffer.Enqueue(m);
+ }
+ }
+
+
+ public class PublishThread : PerfTestClient
+ {
+ private readonly string _exchange;
+ private readonly string _key;
+
+ public PublishThread(Options options, string key, string exchange)
+ : base(options)
+ {
+ _key = key;
+ _exchange = exchange;
+ }
+
+
+ public override void Start()
+ {
+ byte[] data = new byte[Options.Size];
+ // randomly populate data
+ Random r = new Random(34);
+ r.NextBytes(data);
+ IMessage message = new Message();
+ message.appendData(data);
+
+ message.DeliveryProperties.setRoutingKey(_key);
+
+ if (Options.Durable)
+ message.DeliveryProperties.setDeliveryMode(MessageDeliveryMode.PERSISTENT);
+
+ if (Options.Tx > 0)
+ {
+ Session.txSelect();
+ Session.sync();
+ }
+
+ CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
+ // Create a listener and subscribe it to the queue named "pub_start"
+ IMessageListener listener = new SyncListener(buffer);
+ string localQueue = "localQueue-" + UUID.randomUUID().ToString();
+ Session.queueDeclare(localQueue, null, null, Option.AUTO_DELETE);
+ Session.exchangeBind(localQueue, "amq.direct", "pub_start");
+ Session.attachMessageListener(listener, localQueue);
+ Session.messageSubscribe(localQueue);
+ if (Options.Tx > 0)
+ {
+ Session.txCommit();
+ Session.sync();
+ }
+ buffer.Dequeue();
+
+ for (int j = 0; j < Options.Iterations; ++j)
+ {
+ DateTime start = DateTime.Now;
+ for (long i = 0; i < Options.Count; ++i)
+ {
+ Session.messageTransfer(_exchange, message);
+
+ if (Options.SyncPub)
+ {
+ Session.sync();
+ }
+ if (Options.Tx > 0 && (i + 1)%Options.Tx == 0)
+ {
+ Session.txSelect();
+ Session.sync();
+ }
+ if (Options.IntervalPub > 0)
+ {
+ Thread.Sleep((int) Options.IntervalSub*1000);
+ }
+ }
+ Session.sync();
+ DateTime end = DateTime.Now;
+
+ // Report to publisher.
+ message.DeliveryProperties.setRoutingKey("pub_done");
+ message.clearData();
+ double time = end.Subtract(start).TotalMilliseconds;
+ byte[] rate = BitConverter.GetBytes( Options.Count / time );
+ message.appendData(rate);
+ Session.messageTransfer("amq.direct", message);
+ if (Options.Tx > 0)
+ {
+ Session.txSelect();
+ Session.sync();
+ }
+ }
+ Session.close();
+ }
+ }
+
+ public class Controller : PerfTestClient
+ {
+ public Controller(Options options)
+ : base(options)
+ {
+ }
+
+ private void process(int size, string queue)
+ {
+ CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
+ IMessageListener listener = new SyncListener(buffer);
+ string localQueue = "queue-" + UUID.randomUUID().ToString();
+ Session.queueDeclare(localQueue, null, null, Option.AUTO_DELETE);
+ Session.exchangeBind(localQueue, "amq.direct", queue);
+ Session.attachMessageListener(listener, localQueue);
+ Session.messageSubscribe(localQueue);
+ for (int i = 0; i < size; ++i)
+ {
+ buffer.Dequeue();
+ }
+ }
+
+ private double processRate(int size, string queue)
+ {
+ CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
+ IMessageListener listener = new SyncListener(buffer);
+ string localQueue = "queue-" + UUID.randomUUID().ToString();
+ Session.queueDeclare(localQueue, null, null, Option.AUTO_DELETE);
+ Session.exchangeBind(localQueue, "amq.direct", queue);
+ Session.attachMessageListener(listener, localQueue);
+ Session.messageSubscribe(localQueue);
+ double rate = 0;
+ RangeSet range = new RangeSet();
+ for (int i = 0; i < size; ++i)
+ {
+ IMessage m = buffer.Dequeue();
+ range.add(m.Id);
+ BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
+ byte[] body = new byte[m.Body.Length - m.Body.Position];
+ reader.Read(body, 0, body.Length);
+ rate += BitConverter.ToDouble(body,0);
+ }
+ Session.messageAccept(range);
+ return rate;
+ }
+
+ private void send(int size, string queue, string data)
+ {
+ IMessage message = new Message();
+ message.DeliveryProperties.setRoutingKey(queue);
+ message.appendData(Encoding.UTF8.GetBytes(data));
+ for (int i = 0; i < size; ++i)
+ {
+ Session.messageTransfer("amq.direct", message);
+ }
+ }
+
+ public override void Start()
+ {
+ process(Options.Subs, "sub_ready");
+ for (int j = 0; j < Options.Iterations; ++j)
+ {
+ DateTime start = DateTime.Now;
+ send(Options.Pubs, "pub_start", "start"); // Start publishers
+ double pubrate = processRate(Options.Pubs, "pub_done");
+ double subrate = processRate(Options.Subs, "sub_done");
+ DateTime end = DateTime.Now;
+
+ double transfers = (Options.Pubs*Options.Count) + (Options.Subs*Options.SubQuota);
+ double time = end.Subtract(start).TotalSeconds;
+ double txrate = transfers/time;
+ double mbytes = (txrate*Options.Size) / (1024 * 1024) ;
+
+ Console.WriteLine("Total: " + transfers + " transfers of " + Options.Size + " bytes in "
+ + time + " seconds.\n" +
+ "Publish transfers/sec: " + pubrate * 1000 + "\n" +
+ "Subscribe transfers/sec: " + subrate * 1000 + "\n" +
+ "Total transfers/sec: " + txrate + "\n" +
+ "Total Mbytes/sec: " + mbytes);
+ Console.WriteLine("done");
+ }
+
+ }
+ }
+
+
+ public class PerfTest
+ {
+ private static int Main(string[] args)
+ {
+ Options options = new Options();
+ CommandLineParser parser = new CommandLineParser(options);
+ parser.Parse();
+ if (parser.HasErrors)
+ {
+ Console.WriteLine(parser.UsageInfo.GetErrorsAsString(78));
+ return -1;
+ }
+ if (options.Help)
+ {
+ Console.WriteLine(parser.UsageInfo.GetOptionsAsString(78));
+ return 0;
+ }
+ bool singleProcess =
+ (!options.Setup && !options.Control && !options.Publish && !options.Subscribe);
+ if (singleProcess)
+ {
+ options.Setup = options.Control = options.Publish = true;
+ options.Subscribe = true;
+ }
+
+
+ string exchange = "amq.direct";
+ switch (options.Mode)
+ {
+ case "shared":
+ options.SubQuota = (options.Pubs*options.Count)/options.Subs;
+ break;
+ case "fanout":
+ options.SubQuota = (options.Pubs*options.Count);
+ exchange = "amq.fanout";
+ break;
+ case "topic":
+ options.SubQuota = (options.Pubs*options.Count);
+ exchange = "amq.topic";
+ break;
+ }
+
+ if (options.Setup)
+ {
+ SetupTest setup = new SetupTest(options);
+ setup.Start(); // Set up queues
+ }
+
+ Thread contT = null;
+ if ( options.Control)
+ {
+ Controller c = new Controller(options);
+ contT = new Thread(c.Start);
+ contT.Start();
+ }
+
+ Thread[] publishers = null;
+ Thread[] subscribers = null;
+
+ // Start pubs/subs for each queue/topic.
+ for (int i = 0; i < options.Queues; ++i)
+ {
+ string key = "perftest" + i; // Queue or topic name.
+ if (options.Publish)
+ {
+ int n = singleProcess ? options.Pubs : 1;
+ publishers = new Thread[n];
+ for (int j = 0; j < n; ++j)
+ {
+ PublishThread pt = new PublishThread(options, key, exchange);
+ publishers[i] = new Thread(pt.Start);
+ publishers[i].Start();
+ }
+ }
+ if ( options.Subscribe)
+ {
+ int n = singleProcess ? options.Subs : 1;
+ subscribers = new Thread[n];
+ for (int j = 0; j < n; ++j)
+ {
+ SubscribeThread st;
+ if (options.Mode.Equals("shared"))
+ st = new SubscribeThread(options, key);
+ else
+ st = new SubscribeThread(options, key, exchange);
+ subscribers[i] = new Thread(st.Start);
+ subscribers[i].Start();
+ }
+ }
+ }
+
+ if (options.Control)
+ {
+ contT.Join();
+ }
+
+
+ // Wait for started threads.
+ if (options.Publish)
+ {
+ foreach (Thread t in publishers)
+ {
+ t.Join();
+ }
+ }
+
+ if (options.Subscribe)
+ {
+ foreach (Thread t in subscribers)
+ {
+ t.Join();
+ }
+ }
+
+
+ return 0;
+ }
+ }
+}
Modified: qpid/trunk/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs Thu Dec 18 16:53:56 2008
@@ -1,33 +1,54 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("perftest")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("perftest")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("11b542db-0d57-4a67-8b92-24ac1d4ed4cf")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.10.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+/*
+ *
+ * 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.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("perftest")]
+[assembly: AssemblyDescription("Built from svn revision number: ")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("perftest")]
+[assembly: AssemblyCopyright("Apache Software Foundation")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("11b542db-0d57-4a67-8b92-24ac1d4ed4cf")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+[assembly: AssemblyVersion("0.10.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Modified: qpid/trunk/qpid/dotnet/client-010/perftest/perftest.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/perftest/perftest.csproj?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/perftest/perftest.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/perftest/perftest.csproj Thu Dec 18 16:53:56 2008
@@ -1,61 +1,82 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>perftest</RootNamespace>
- <AssemblyName>perftest</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="C5, Version=1.0.2.0, Culture=neutral, PublicKeyToken=06a1b38866503b69, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\plossum\C5.dll</HintPath>
- </Reference>
- <Reference Include="Plossum CommandLine, Version=0.3.0.14, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\plossum\Plossum CommandLine.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="PerfTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
+<!--
+
+ 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.
+
+-->
+
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>perftest</RootNamespace>
+ <AssemblyName>perftest</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="C5, Version=1.0.2.0, Culture=neutral, PublicKeyToken=06a1b38866503b69, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\lib\plossum\C5.dll</HintPath>
+ </Reference>
+ <Reference Include="Plossum CommandLine, Version=0.3.0.14, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\lib\plossum\Plossum CommandLine.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="PerfTest.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\client\Client.csproj">
+ <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
+ <Name>Client</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
Modified: qpid/trunk/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs Thu Dec 18 16:53:56 2008
@@ -1,35 +1,56 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid Test")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid Test")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3d62cb4f-4353-4eed-9669-3e1bc902081d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.10.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+/*
+ *
+ * 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.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Qpid Test")]
+[assembly: AssemblyDescription("Built from svn revision number: ")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Qpid Test")]
+[assembly: AssemblyCopyright("Apache Software Foundation")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3d62cb4f-4353-4eed-9669-3e1bc902081d")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("0.10.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
Modified: qpid/trunk/qpid/dotnet/client-010/test/Test.csproj
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/test/Test.csproj?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/test/Test.csproj (original)
+++ qpid/trunk/qpid/dotnet/client-010/test/Test.csproj Thu Dec 18 16:53:56 2008
@@ -1,69 +1,90 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95CB4C90-7C53-44A9-B11C-96235F158ACA}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>test</RootNamespace>
- <AssemblyName>Qpid Test</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="interop\Admin.cs" />
- <Compile Include="interop\ApplicationHeaders.cs" />
- <Compile Include="interop\Message.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="interop\TestCase.cs" />
- <Compile Include="transport\util\ByteEncoderTest.cs" />
- <Compile Include="transport\util\CircularBufferTest.cs" />
- <Compile Include="transport\util\ResultFutureTest.cs" />
- <Compile Include="transport\util\SerialTest.cs" />
- <Compile Include="transport\util\UUIDTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
+<!--
+
+ 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.
+
+-->
+
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95CB4C90-7C53-44A9-B11C-96235F158ACA}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>test</RootNamespace>
+ <AssemblyName>Qpid Test</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\lib\log4net\log4net.dll</HintPath>
+ </Reference>
+ <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\lib\nunit\nunit.framework.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="interop\Admin.cs" />
+ <Compile Include="interop\ApplicationHeaders.cs" />
+ <Compile Include="interop\Message.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="interop\TestCase.cs" />
+ <Compile Include="transport\util\ByteEncoderTest.cs" />
+ <Compile Include="transport\util\CircularBufferTest.cs" />
+ <Compile Include="transport\util\ResultFutureTest.cs" />
+ <Compile Include="transport\util\SerialTest.cs" />
+ <Compile Include="transport\util\UUIDTest.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\client\Client.csproj">
+ <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
+ <Name>Client</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
Modified: qpid/trunk/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs?rev=727872&r1=727871&r2=727872&view=diff
==============================================================================
--- qpid/trunk/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs (original)
+++ qpid/trunk/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs Thu Dec 18 16:53:56 2008
@@ -1,36 +1,57 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid WCF")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid WCF")]
-[assembly: AssemblyCopyright("Copyright © Apache Software Foundation 2008")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("a39d56ec-7d81-48e1-9602-347a3ce6f638")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+/*
+ *
+ * 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.
+ *
+ */
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Qpid WCF")]
+[assembly: AssemblyDescription("Built from svn revision number: ")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Apache Software Foundation")]
+[assembly: AssemblyProduct("Qpid WCF")]
+[assembly: AssemblyCopyright("Apache Software Foundation")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a39d56ec-7d81-48e1-9602-347a3ce6f638")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("0.10.0.0")]
+[assembly: AssemblyVersion("0.10.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]