Skip to content

Commit 6468678

Browse files
author
Simon MacMullen
committed
MulticastMain it ain't, but let's allow varying message size.
1 parent 7deccd9 commit 6468678

File tree

1 file changed

+5
-3
lines changed
  • projects/examples/client/PerfTest/src/examples

1 file changed

+5
-3
lines changed

projects/examples/client/PerfTest/src/examples/PerfTest.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@
4747

4848
namespace RabbitMQ.Client.Examples {
4949
public class PerfTest {
50-
private static readonly byte[] Message = new byte[0];
50+
private static byte[] Message;
5151

5252
public static int Main(string[] args) {
53-
if (args.Length < 2) {
54-
Console.Error.WriteLine("Usage: PerfTest <uri> <number of messages>");
53+
if (args.Length < 3) {
54+
Console.Error.WriteLine("Usage: PerfTest <uri> <number of messages> <size of messages>");
5555
Console.Error.WriteLine("RabbitMQ .NET client version "+typeof(IModel).Assembly.GetName().Version.ToString());
5656
Console.Error.WriteLine("Parameters:");
5757
Console.Error.WriteLine(" <uri> = \"amqp://user:pass@host:port/vhost\"");
@@ -60,6 +60,8 @@ public static int Main(string[] args) {
6060

6161
string serverAddress = args[0];
6262
int messageCount = int.Parse(args[1]);
63+
int messageSize = int.Parse(args[2]);
64+
Message = new byte[messageSize];
6365

6466
ConnectionFactory cf = new ConnectionFactory();
6567
cf.Uri = serverAddress;

0 commit comments

Comments
 (0)