File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
projects/examples/client/PerfTest/src/examples Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 47
47
48
48
namespace RabbitMQ . Client . Examples {
49
49
public class PerfTest {
50
- private static readonly byte [ ] Message = new byte [ 0 ] ;
50
+ private static byte [ ] Message ;
51
51
52
52
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> " ) ;
55
55
Console . Error . WriteLine ( "RabbitMQ .NET client version " + typeof ( IModel ) . Assembly . GetName ( ) . Version . ToString ( ) ) ;
56
56
Console . Error . WriteLine ( "Parameters:" ) ;
57
57
Console . Error . WriteLine ( " <uri> = \" amqp://user:pass@host:port/vhost\" " ) ;
@@ -60,6 +60,8 @@ public static int Main(string[] args) {
60
60
61
61
string serverAddress = args [ 0 ] ;
62
62
int messageCount = int . Parse ( args [ 1 ] ) ;
63
+ int messageSize = int . Parse ( args [ 2 ] ) ;
64
+ Message = new byte [ messageSize ] ;
63
65
64
66
ConnectionFactory cf = new ConnectionFactory ( ) ;
65
67
cf . Uri = serverAddress ;
You can’t perform that action at this time.
0 commit comments