Skip to content

Commit 187f2c7

Browse files
author
Alvaro Videla
committed
adds uri support for benchmark specs
1 parent df710c0 commit 187f2c7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ public static Scenario fromJSON(Map json, ConnectionFactory factory) {
1212
Integer interval = read("interval", json, Integer.class, 1000);
1313
List paramsJSON = read("params", json, List.class);
1414

15+
String uri = read("uri", json, String.class);
16+
try {
17+
factory.setUri(uri);
18+
} catch(Exception e) {
19+
System.out.println("scenario: " + name + " with malformed uri: "
20+
+ uri + " - " + e.getMessage());
21+
System.exit(1);
22+
}
23+
1524
MulticastParams[] params = new MulticastParams[paramsJSON.size()];
1625
for (int i = 0; i < paramsJSON.size(); i++) {
1726
params[i] = paramsFromJSON((Map) paramsJSON.get(i));

0 commit comments

Comments
 (0)