Skip to content

Commit 8b2d3d8

Browse files
author
Simon MacMullen
committed
Run the first test for a longer time, so in 2.7.1 we can see memory alarsm going off.
1 parent e6735f0 commit 8b2d3d8

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private static void writeJSON() throws IOException {
5353
private static void runStaticBrokerTests() throws Exception {
5454
Broker broker = Broker.HIPE_COARSE;
5555
broker.start();
56-
runTests(new Scenario[]{no_consume(), no_ack(), no_ack_mandatory(), no_ack_immediate(), ack(),
56+
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),
5858
fill_drain_queue("large", 1000000), consumers(),
5959
message_sizes(), message_size_vs_producers(), rate_vs_latency()});
@@ -69,6 +69,12 @@ private static void runTests(Scenario[] scenarios) throws Exception {
6969
}
7070
}
7171

72+
private static Scenario no_ack_long() throws IOException, InterruptedException {
73+
MulticastParams params = params();
74+
params.setTimeLimit(500);
75+
return new SimpleScenario("no-ack-long", factory, 10000, params);
76+
}
77+
7278
private static Scenario no_consume() throws IOException, InterruptedException {
7379
MulticastParams params = params();
7480
params.setConsumerCount(0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public RateVsLatencyScenario(String name, ConnectionFactory factory, MulticastPa
3434

3535
@Override
3636
public void run() throws Exception {
37-
SimpleScenario s = new SimpleScenario(factory, params);
37+
SimpleScenario s = new SimpleScenario("untitled", factory, params);
3838
s.run();
3939
SimpleScenarioStats m = s.getStats();
4040
int maxRate = (int) (m.getRecvRate() + m.getSendRate()) / 2;

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ public class SimpleScenario implements Scenario {
2626
private MulticastParams[] params;
2727
private SimpleScenarioStats stats;
2828

29-
public SimpleScenario(ConnectionFactory factory, MulticastParams... params) {
30-
this("untitled", factory, params);
29+
public SimpleScenario(String name, ConnectionFactory factory, MulticastParams... params) {
30+
this(name, factory, 1000L, params);
3131
}
3232

33-
public SimpleScenario(String name, ConnectionFactory factory, MulticastParams... params) {
33+
public SimpleScenario(String name, ConnectionFactory factory, long interval, MulticastParams... params) {
3434
this.name = name;
3535
this.factory = factory;
3636
this.params = params;
37+
this.stats = new SimpleScenarioStats(interval);
3738
}
3839

3940
@Override
4041
public void run() throws IOException, InterruptedException {
41-
stats = new SimpleScenarioStats(1000L);
4242
for (MulticastParams p : params) {
4343
MulticastSet set = new MulticastSet(stats, factory, p);
4444
set.run();

0 commit comments

Comments
 (0)