refactor(性能测试): 性能测试启动增加一个ENV, topic

This commit is contained in:
Captain.B 2021-07-30 16:18:48 +08:00 committed by 刘瑞斌
parent 9636a37199
commit ee40e24b4a
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,7 @@ public class KafkaProperties {
private String queueSize = "20000"; // backend listener queue size
private KafkaProperties.Ssl ssl = new KafkaProperties.Ssl();
private KafkaProperties.Log log = new KafkaProperties.Log();
private KafkaProperties.Report report = new KafkaProperties.Report();
@Getter
@Setter
@ -49,4 +50,10 @@ public class KafkaProperties {
public static class Log {
private String topic;
}
@Getter
@Setter
public static class Report {
private String topic;
}
}

View File

@ -90,6 +90,7 @@ public class DockerTestEngine extends AbstractEngine {
env.put("REPORT_ID", this.getReportId());
env.put("BOOTSTRAP_SERVERS", kafkaProperties.getBootstrapServers());
env.put("LOG_TOPIC", kafkaProperties.getLog().getTopic());
env.put("JMETER_REPORTS_TOPIC", kafkaProperties.getReport().getTopic());
env.put("RESOURCE_ID", resource.getId());
env.put("THREAD_NUM", "0");// 传入0表示不用修改线程数
env.put("HEAP", HEAP);