start monitor in TestMonitorSampler
change LimitModel in monitor
This commit is contained in:
parent
18d7bf0fbb
commit
89b6e39e0c
|
@ -47,12 +47,6 @@ public class Monitor {
|
|||
private Set<MonitorResult> results;
|
||||
private Logger logger = Logger.getLogger(Monitor.class);
|
||||
private TestPlanFactory testPlanFactory;
|
||||
private MonitorMessenger monitorMessenger;
|
||||
|
||||
@Autowired
|
||||
private void setMonitorMessenger(MonitorMessenger monitorMessenger) {
|
||||
this.monitorMessenger = monitorMessenger;
|
||||
}
|
||||
|
||||
public Monitor() {
|
||||
this.results = new HashSet<MonitorResult>();
|
||||
|
@ -144,7 +138,7 @@ public class Monitor {
|
|||
}
|
||||
|
||||
public void start(UUID testPlanId, String limitModel){
|
||||
monitorMessenger.startMonitor(hostName, port, testPlanId, limitModel);
|
||||
this.getTestMonitorSampler().startMonitor(hostName, port, testPlanId, limitModel);
|
||||
}
|
||||
|
||||
public List<MonitorResult> createFinishedResult() {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.bench4q.master.domain.valueobject.datastatistics;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import org.bench4q.master.infrastructure.communication.MonitorMessenger;
|
||||
import org.bench4q.share.models.monitor.MonitorMain;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -19,4 +21,7 @@ public class TestMonitorSampler {
|
|||
return this.monitorMessenger.monitorModel(hostName, port);
|
||||
}
|
||||
|
||||
public boolean startMonitor(String hostName, int port, UUID testPlanId, String limitModel){
|
||||
return this.monitorMessenger.startMonitor(hostName, port, testPlanId, limitModel);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,13 +5,15 @@ import java.util.List;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
@XmlRootElement
|
||||
public class LimitModel {
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
|
||||
private List<ParameterModel> params;
|
||||
|
||||
@XmlElementWrapper(name = "limitParameterList")
|
||||
@XmlElement(name = "limitParameter")
|
||||
public List<ParameterModel> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
@ -20,7 +22,9 @@ public class LimitModel {
|
|||
this.params = params;
|
||||
}
|
||||
|
||||
|
||||
@XmlRootElement
|
||||
@XmlType(name = "limitParameterModel")
|
||||
public static class ParameterModel {
|
||||
private String name;
|
||||
private double limit;
|
||||
|
|
Loading…
Reference in New Issue