modify MonitorMain and MainController
delete unused field and fix bug MainController
This commit is contained in:
parent
810bfe7c15
commit
66b2a9bd77
|
@ -1,6 +1,8 @@
|
|||
package org.bench4q.monitor.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
|
||||
|
@ -42,10 +44,14 @@ public class MainController {
|
|||
return testPlanId.toString();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/brief/{testPlanId}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
MonitorMain brief(@PathVariable UUID testPlanId) throws SigarException,
|
||||
InterruptedException, ExecutionException {
|
||||
return new MonitorMain(this.submitedLimits.get(testPlanId));
|
||||
LimitModel limitModel = this.submitedLimits.get(testPlanId);
|
||||
if (limitModel != null)
|
||||
return new MonitorMain(limitModel);
|
||||
else return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,6 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.jar.Attributes.Name;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
@ -30,8 +28,6 @@ public class MonitorMain extends SampleModel {
|
|||
private NetworkInterfaceModel networkInterfaceModel;
|
||||
@XmlElement(name = "process_info")
|
||||
private ProcessModel processModel;
|
||||
@XmlElement(name = "touch_limit")
|
||||
private boolean isTouchLimit;
|
||||
@XmlElement(name = "reach_limit")
|
||||
private boolean isReachLimit;
|
||||
private SimpleDateFormat dateFormat = new SimpleDateFormat(
|
||||
|
@ -85,6 +81,14 @@ public class MonitorMain extends SampleModel {
|
|||
System.out.println(System.currentTimeMillis() - startTime);
|
||||
}
|
||||
|
||||
public boolean getIsReachLimit() {
|
||||
return isReachLimit;
|
||||
}
|
||||
|
||||
public void setIsReachLimit(boolean isReachLimit) {
|
||||
this.isReachLimit = isReachLimit;
|
||||
}
|
||||
|
||||
private boolean getLimitresult(LimitModel limitModel) throws SigarException {
|
||||
//LimitableFieldsModel limitableFieldsModel = new LimitableFieldsModel();
|
||||
boolean limitResult = false;
|
||||
|
@ -116,11 +120,4 @@ public class MonitorMain extends SampleModel {
|
|||
this.networkInterfaceModel = networkInterfaceModel;
|
||||
}
|
||||
|
||||
public boolean isTouchLimit() {
|
||||
return isTouchLimit;
|
||||
}
|
||||
|
||||
public void setTouchLimit(boolean isTouchLimit) {
|
||||
this.isTouchLimit = isTouchLimit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue