Skip to content

Commit 7de1d4f

Browse files
author
Simon MacMullen
committed
More tweaks. This really needs to be a config file or something...
1 parent 896b307 commit 7de1d4f

File tree

2 files changed

+27
-7
lines changed

2 files changed

+27
-7
lines changed

test/src/com/rabbitmq/examples/perf/PerformanceMain.java

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ private static void runStaticBrokerTests() throws Exception {
5555
broker.start();
5656
runTests(new Scenario[]{no_ack_long(), no_consume(), no_ack(), no_ack_mandatory(), no_ack_immediate(), ack(),
5757
ack_confirm(), ack_confirm_persist(), ack_persist(), fill_drain_queue("small", 500000),
58-
fill_drain_queue("large", 1000000), consumers(),
59-
message_sizes(), message_size_vs_producers(), rate_vs_latency()});
58+
fill_drain_queue("large", 2000000), consumers(), headline_publish(), headline_consume(),
59+
message_sizes_small(), message_sizes_large(), message_size_vs_producers(), rate_vs_latency()});
6060
broker.stop();
6161
}
6262

@@ -75,6 +75,20 @@ private static Scenario no_ack_long() throws IOException, InterruptedException {
7575
return new SimpleScenario("no-ack-long", factory, 10000, params);
7676
}
7777

78+
private static Scenario headline_publish() throws IOException, InterruptedException {
79+
MulticastParams params = params();
80+
params.setProducerCount(10);
81+
params.setConsumerCount(0);
82+
return new SimpleScenario("headline-publish", factory, params);
83+
}
84+
85+
private static Scenario headline_consume() throws IOException, InterruptedException {
86+
MulticastParams params = params();
87+
params.setProducerCount(1);
88+
params.setConsumerCount(20);
89+
return new SimpleScenario("headline-consume", factory, params);
90+
}
91+
7892
private static Scenario no_consume() throws IOException, InterruptedException {
7993
MulticastParams params = params();
8094
params.setConsumerCount(0);
@@ -146,13 +160,19 @@ private static MulticastParams fill_drain_params() {
146160
return params;
147161
}
148162

149-
private static Scenario message_sizes() throws IOException, InterruptedException {
163+
private static Scenario message_sizes_small() throws IOException, InterruptedException {
150164
MulticastParams params = params();
151-
return new VaryingScenario("message-sizes", factory, params,
165+
return new VaryingScenario("message-sizes-small", factory, params,
152166
var("minMsgSize", 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000,
153167
1200, 1400, 1600, 1800, 2000, 3000, 4000, 5000));
154168
}
155169

170+
private static Scenario message_sizes_large() throws IOException, InterruptedException {
171+
MulticastParams params = params();
172+
return new VaryingScenario("message-sizes-large", factory, params,
173+
var("minMsgSize", 5000, 10000, 20000, 50000, 100000, 500000, 1000000));
174+
}
175+
156176
private static Scenario consumers() throws IOException, InterruptedException {
157177
MulticastParams params = params();
158178
params.setAutoAck(false);
@@ -165,14 +185,14 @@ private static Scenario message_size_vs_producers() throws IOException, Interrup
165185
MulticastParams params = params();
166186
params.setConsumerCount(0);
167187
return new VaryingScenario("message-sizes-and-producers", factory, params,
168-
var("minMsgSize", 0, 1000, 10000),
188+
var("minMsgSize", 0, 1000, 10000, 100000),
169189
var("producerCount", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
170190
}
171191

172192
private static Scenario message_size_broker_config() throws IOException, InterruptedException {
173193
MulticastParams params = params();
174194
return new VaryingScenario("message-sizes-and-broker-config", factory, params,
175-
var("minMsgSize", 0, 500, 1000, 1500, 2000),
195+
var("minMsgSize", 0, 1000, 2000, 5000),
176196
new BrokerVariable(Broker.DEFAULT, Broker.HIPE, Broker.COARSE, Broker.HIPE_COARSE));
177197
}
178198

test/src/com/rabbitmq/examples/perf/RateVsLatencyScenario.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void run() throws Exception {
3838
s.run();
3939
SimpleScenarioStats m = s.getStats();
4040
int maxRate = (int) (m.getRecvRate() + m.getSendRate()) / 2;
41-
Double[] factors = new Double[]{0.8, 0.9, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0, 1.01, 1.02, 1.03, 1.04, 1.05};
41+
Double[] factors = new Double[]{0.01, 0.2, 0.4, 0.6, 0.8, 0.9, 0.95, 0.96, 0.97, 0.98, 0.99, 1.0, 1.01, 1.02, 1.03, 1.04, 1.05};
4242
Integer [] rates = new Integer[factors.length];
4343
for (int i = 0; i < rates.length; i++) {
4444
rates[i] = (int) (factors[i] * maxRate);

0 commit comments

Comments
 (0)