Merge Bench4Q-Share
This commit is contained in:
parent
6656637ede
commit
bd7398ece2
|
@ -1,52 +1,52 @@
|
|||
package org.bench4q.share.models.agent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.scriptrecord.PageModel;
|
||||
import org.bench4q.share.models.agent.scriptrecord.UsePluginModel;
|
||||
|
||||
@XmlRootElement(name = "runScenario")
|
||||
public class RunScenarioModel {
|
||||
private int poolSize;
|
||||
private List<UsePluginModel> usePlugins;
|
||||
private List<PageModel> pages;
|
||||
|
||||
@XmlElement
|
||||
public int getPoolSize() {
|
||||
return poolSize;
|
||||
}
|
||||
|
||||
public void setPoolSize(int poolSize) {
|
||||
this.poolSize = poolSize;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "usePlugins")
|
||||
@XmlElement(name = "usePlugin")
|
||||
public List<UsePluginModel> getUsePlugins() {
|
||||
return usePlugins;
|
||||
}
|
||||
|
||||
public void setUsePlugins(List<UsePluginModel> usePlugins) {
|
||||
this.usePlugins = usePlugins;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "pages")
|
||||
@XmlElement(name = "page")
|
||||
public List<PageModel> getPages() {
|
||||
return pages;
|
||||
}
|
||||
|
||||
public void setPages(List<PageModel> pages) {
|
||||
this.pages = pages;
|
||||
}
|
||||
|
||||
public RunScenarioModel() {
|
||||
this.setUsePlugins(new ArrayList<UsePluginModel>());
|
||||
this.setPages(new ArrayList<PageModel>());
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.agent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.scriptrecord.PageModel;
|
||||
import org.bench4q.share.models.agent.scriptrecord.UsePluginModel;
|
||||
|
||||
@XmlRootElement(name = "runScenario")
|
||||
public class RunScenarioModel {
|
||||
private int poolSize;
|
||||
private List<UsePluginModel> usePlugins;
|
||||
private List<PageModel> pages;
|
||||
|
||||
@XmlElement
|
||||
public int getPoolSize() {
|
||||
return poolSize;
|
||||
}
|
||||
|
||||
public void setPoolSize(int poolSize) {
|
||||
this.poolSize = poolSize;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "usePlugins")
|
||||
@XmlElement(name = "usePlugin")
|
||||
public List<UsePluginModel> getUsePlugins() {
|
||||
return usePlugins;
|
||||
}
|
||||
|
||||
public void setUsePlugins(List<UsePluginModel> usePlugins) {
|
||||
this.usePlugins = usePlugins;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "pages")
|
||||
@XmlElement(name = "page")
|
||||
public List<PageModel> getPages() {
|
||||
return pages;
|
||||
}
|
||||
|
||||
public void setPages(List<PageModel> pages) {
|
||||
this.pages = pages;
|
||||
}
|
||||
|
||||
public RunScenarioModel() {
|
||||
this.setUsePlugins(new ArrayList<UsePluginModel>());
|
||||
this.setPages(new ArrayList<PageModel>());
|
||||
}
|
||||
}
|
|
@ -1,53 +1,53 @@
|
|||
package org.bench4q.share.models.agent.scriptrecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "batch")
|
||||
public class BatchModel {
|
||||
private int Id;
|
||||
private int parentId;
|
||||
private int childId;
|
||||
private List<BehaviorModel> behaviors;
|
||||
|
||||
@XmlElement
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
Id = id;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public int getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(int parentBatchId) {
|
||||
this.parentId = parentBatchId;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public int getChildId() {
|
||||
return childId;
|
||||
}
|
||||
|
||||
public void setChildId(int childId) {
|
||||
this.childId = childId;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "behaviors")
|
||||
@XmlElement(name = "behaviorModel")
|
||||
public List<BehaviorModel> getBehaviors() {
|
||||
return behaviors;
|
||||
}
|
||||
|
||||
public void setBehaviors(List<BehaviorModel> behaviors) {
|
||||
this.behaviors = behaviors;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.agent.scriptrecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "batch")
|
||||
public class BatchModel {
|
||||
private int Id;
|
||||
private int parentId;
|
||||
private int childId;
|
||||
private List<BehaviorModel> behaviors;
|
||||
|
||||
@XmlElement
|
||||
public int getId() {
|
||||
return Id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
Id = id;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public int getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(int parentBatchId) {
|
||||
this.parentId = parentBatchId;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public int getChildId() {
|
||||
return childId;
|
||||
}
|
||||
|
||||
public void setChildId(int childId) {
|
||||
this.childId = childId;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "behaviors")
|
||||
@XmlElement(name = "behaviorModel")
|
||||
public List<BehaviorModel> getBehaviors() {
|
||||
return behaviors;
|
||||
}
|
||||
|
||||
public void setBehaviors(List<BehaviorModel> behaviors) {
|
||||
this.behaviors = behaviors;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,93 +1,93 @@
|
|||
package org.bench4q.share.models.agent.scriptrecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.ParameterModel;
|
||||
|
||||
@XmlRootElement(name = "behaviorModel")
|
||||
public class BehaviorModel {
|
||||
private int id;
|
||||
private String use;
|
||||
private String name;
|
||||
private String type;
|
||||
private List<ParameterModel> parameters;
|
||||
|
||||
@XmlElement
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getUse() {
|
||||
return use;
|
||||
}
|
||||
|
||||
public void setUse(String use) {
|
||||
this.use = use;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "parameters")
|
||||
@XmlElement(name = "parameter")
|
||||
public List<ParameterModel> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setParameters(List<ParameterModel> parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
private BehaviorModel() {
|
||||
}
|
||||
|
||||
public static BehaviorModel TimerBehaviorBuilder(int id, String name,
|
||||
String use, List<ParameterModel> parameters) {
|
||||
BehaviorModel behaviorBaseModel = buildBehaviorModelWithoutType(id,
|
||||
name, use, parameters);
|
||||
behaviorBaseModel.setType("TIMERBEHAVIOR");
|
||||
return behaviorBaseModel;
|
||||
}
|
||||
|
||||
private static BehaviorModel buildBehaviorModelWithoutType(int id,
|
||||
String name, String use, List<ParameterModel> parameters) {
|
||||
BehaviorModel behaviorBaseModel = new BehaviorModel();
|
||||
behaviorBaseModel.setId(id);
|
||||
behaviorBaseModel.setName(name);
|
||||
behaviorBaseModel.setUse(use);
|
||||
behaviorBaseModel.setParameters(parameters);
|
||||
return behaviorBaseModel;
|
||||
}
|
||||
|
||||
public static BehaviorModel UserBehaviorBuilder(int id, String name,
|
||||
String use, List<ParameterModel> parameters) {
|
||||
BehaviorModel behaviorBaseModel = buildBehaviorModelWithoutType(id,
|
||||
name, use, parameters);
|
||||
behaviorBaseModel.setType("USERBEHAVIOR");
|
||||
return behaviorBaseModel;
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.agent.scriptrecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.ParameterModel;
|
||||
|
||||
@XmlRootElement(name = "behaviorModel")
|
||||
public class BehaviorModel {
|
||||
private int id;
|
||||
private String use;
|
||||
private String name;
|
||||
private String type;
|
||||
private List<ParameterModel> parameters;
|
||||
|
||||
@XmlElement
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getUse() {
|
||||
return use;
|
||||
}
|
||||
|
||||
public void setUse(String use) {
|
||||
this.use = use;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "parameters")
|
||||
@XmlElement(name = "parameter")
|
||||
public List<ParameterModel> getParameters() {
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setParameters(List<ParameterModel> parameters) {
|
||||
this.parameters = parameters;
|
||||
}
|
||||
|
||||
private BehaviorModel() {
|
||||
}
|
||||
|
||||
public static BehaviorModel TimerBehaviorBuilder(int id, String name,
|
||||
String use, List<ParameterModel> parameters) {
|
||||
BehaviorModel behaviorBaseModel = buildBehaviorModelWithoutType(id,
|
||||
name, use, parameters);
|
||||
behaviorBaseModel.setType("TIMERBEHAVIOR");
|
||||
return behaviorBaseModel;
|
||||
}
|
||||
|
||||
private static BehaviorModel buildBehaviorModelWithoutType(int id,
|
||||
String name, String use, List<ParameterModel> parameters) {
|
||||
BehaviorModel behaviorBaseModel = new BehaviorModel();
|
||||
behaviorBaseModel.setId(id);
|
||||
behaviorBaseModel.setName(name);
|
||||
behaviorBaseModel.setUse(use);
|
||||
behaviorBaseModel.setParameters(parameters);
|
||||
return behaviorBaseModel;
|
||||
}
|
||||
|
||||
public static BehaviorModel UserBehaviorBuilder(int id, String name,
|
||||
String use, List<ParameterModel> parameters) {
|
||||
BehaviorModel behaviorBaseModel = buildBehaviorModelWithoutType(id,
|
||||
name, use, parameters);
|
||||
behaviorBaseModel.setType("USERBEHAVIOR");
|
||||
return behaviorBaseModel;
|
||||
}
|
||||
}
|
|
@ -1,27 +1,27 @@
|
|||
package org.bench4q.share.models.agent.scriptrecord;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "page")
|
||||
public class PageModel {
|
||||
private List<BatchModel> batches;
|
||||
|
||||
@XmlElementWrapper(name = "batches")
|
||||
@XmlElement(name = "batch")
|
||||
public List<BatchModel> getBatches() {
|
||||
return batches;
|
||||
}
|
||||
|
||||
public void setBatches(List<BatchModel> batches) {
|
||||
this.batches = batches;
|
||||
}
|
||||
|
||||
public PageModel() {
|
||||
this.setBatches(new ArrayList<BatchModel>());
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.agent.scriptrecord;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "page")
|
||||
public class PageModel {
|
||||
private List<BatchModel> batches;
|
||||
|
||||
@XmlElementWrapper(name = "batches")
|
||||
@XmlElement(name = "batch")
|
||||
public List<BatchModel> getBatches() {
|
||||
return batches;
|
||||
}
|
||||
|
||||
public void setBatches(List<BatchModel> batches) {
|
||||
this.batches = batches;
|
||||
}
|
||||
|
||||
public PageModel() {
|
||||
this.setBatches(new ArrayList<BatchModel>());
|
||||
}
|
||||
}
|
|
@ -1,26 +1,26 @@
|
|||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.BehaviorBriefModel;
|
||||
|
||||
@XmlRootElement(name = "testBehaviorBriefModel")
|
||||
public class AgentBehaviorsBriefModel extends DataStatisticsModel {
|
||||
private List<BehaviorBriefModel> behaviorBriefModels;
|
||||
|
||||
@XmlElementWrapper(name = "behaviorBriefList")
|
||||
@XmlElement(name = "behaviorBrief")
|
||||
public List<BehaviorBriefModel> getBehaviorBriefModels() {
|
||||
return behaviorBriefModels;
|
||||
}
|
||||
|
||||
public void setBehaviorBriefModels(
|
||||
List<BehaviorBriefModel> behaviorBriefModels) {
|
||||
this.behaviorBriefModels = behaviorBriefModels;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.BehaviorBriefModel;
|
||||
|
||||
@XmlRootElement(name = "testBehaviorBriefModel")
|
||||
public class AgentBehaviorsBriefModel extends DataStatisticsModel {
|
||||
private List<BehaviorBriefModel> behaviorBriefModels;
|
||||
|
||||
@XmlElementWrapper(name = "behaviorBriefList")
|
||||
@XmlElement(name = "behaviorBrief")
|
||||
public List<BehaviorBriefModel> getBehaviorBriefModels() {
|
||||
return behaviorBriefModels;
|
||||
}
|
||||
|
||||
public void setBehaviorBriefModels(
|
||||
List<BehaviorBriefModel> behaviorBriefModels) {
|
||||
this.behaviorBriefModels = behaviorBriefModels;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,176 +1,176 @@
|
|||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AgentBriefStatusModel extends DataStatisticsModel {
|
||||
private long timeFrame;
|
||||
private long minResponseTime;
|
||||
private long maxResponseTime;
|
||||
private long successCountFromBegin;
|
||||
private long successThroughputThisTime;
|
||||
private long failCountFromBegin;
|
||||
private long failThroughputThisTime;
|
||||
private long successCountThisTime;
|
||||
private long failCountThisTime;
|
||||
private long totalResponseTimeThisTime;
|
||||
private long totalSqureResponseTimeThisTime;
|
||||
|
||||
private long vUserCount;
|
||||
|
||||
@XmlElement
|
||||
public long getTimeFrame() {
|
||||
return timeFrame;
|
||||
}
|
||||
|
||||
public void setTimeFrame(long timeFrame) {
|
||||
this.timeFrame = timeFrame;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMinResponseTime() {
|
||||
return minResponseTime;
|
||||
}
|
||||
|
||||
public void setMinResponseTime(long minResponseTime) {
|
||||
this.minResponseTime = minResponseTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMaxResponseTime() {
|
||||
return maxResponseTime;
|
||||
}
|
||||
|
||||
public void setMaxResponseTime(long maxResponseTime) {
|
||||
this.maxResponseTime = maxResponseTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getSuccessThroughputThisTime() {
|
||||
return successThroughputThisTime;
|
||||
}
|
||||
|
||||
public void setSuccessThroughputThisTime(long successThroughputThisTime) {
|
||||
this.successThroughputThisTime = successThroughputThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getSuccessCountFromBegin() {
|
||||
return successCountFromBegin;
|
||||
}
|
||||
|
||||
public void setSuccessCountFromBegin(long successCountFromBegin) {
|
||||
this.successCountFromBegin = successCountFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getFailCountFromBegin() {
|
||||
return failCountFromBegin;
|
||||
}
|
||||
|
||||
public void setFailCountFromBegin(long failCountFromBegin) {
|
||||
this.failCountFromBegin = failCountFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getFailThroughputThisTime() {
|
||||
return failThroughputThisTime;
|
||||
}
|
||||
|
||||
public void setFailThroughputThisTime(long failThroughputThisTime) {
|
||||
this.failThroughputThisTime = failThroughputThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getSuccessCountThisTime() {
|
||||
return successCountThisTime;
|
||||
}
|
||||
|
||||
public void setSuccessCountThisTime(long successCountThisTime) {
|
||||
this.successCountThisTime = successCountThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getFailCountThisTime() {
|
||||
return failCountThisTime;
|
||||
}
|
||||
|
||||
public void setFailCountThisTime(long failCountThisTime) {
|
||||
this.failCountThisTime = failCountThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTotalResponseTimeThisTime() {
|
||||
return totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setTotalResponseTimeThisTime(long totalResponseTimeThisTime) {
|
||||
this.totalResponseTimeThisTime = totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTotalSqureResponseTimeThisTime() {
|
||||
return totalSqureResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setTotalSqureResponseTimeThisTime(
|
||||
long totalSqureResponseTimeThisTime) {
|
||||
this.totalSqureResponseTimeThisTime = totalSqureResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getvUserCount() {
|
||||
return vUserCount;
|
||||
}
|
||||
|
||||
public void setvUserCount(long vUserCount) {
|
||||
this.vUserCount = vUserCount;
|
||||
}
|
||||
|
||||
// if the all the fields of target object equals with this's except
|
||||
// timeFrame,
|
||||
// We call it equals.
|
||||
@Override
|
||||
public boolean equals(Object targetObj) {
|
||||
if (!(targetObj instanceof AgentBriefStatusModel) || targetObj == null) {
|
||||
return false;
|
||||
}
|
||||
boolean result = true;
|
||||
AgentBriefStatusModel convertedObject = (AgentBriefStatusModel) targetObj;
|
||||
Field[] fs = this.getClass().getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fs) {
|
||||
if (field.getName().equals("vUserCount")) {
|
||||
continue;
|
||||
}
|
||||
field.setAccessible(true);
|
||||
if (field.getLong(this) != field.getLong(convertedObject)) {
|
||||
System.out.println(field.getName()
|
||||
+ " not equals! and the target is "
|
||||
+ field.getLong(convertedObject) + " and this is "
|
||||
+ field.getLong(this));
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static AgentBriefStatusModel extractBriefStatusModel(String content)
|
||||
throws JAXBException {
|
||||
Unmarshaller unmarshaller = JAXBContext.newInstance(
|
||||
AgentBriefStatusModel.class).createUnmarshaller();
|
||||
return (AgentBriefStatusModel) unmarshaller
|
||||
.unmarshal(new ByteArrayInputStream(content.getBytes()));
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AgentBriefStatusModel extends DataStatisticsModel {
|
||||
private long timeFrame;
|
||||
private long minResponseTime;
|
||||
private long maxResponseTime;
|
||||
private long successCountFromBegin;
|
||||
private long successThroughputThisTime;
|
||||
private long failCountFromBegin;
|
||||
private long failThroughputThisTime;
|
||||
private long successCountThisTime;
|
||||
private long failCountThisTime;
|
||||
private long totalResponseTimeThisTime;
|
||||
private long totalSqureResponseTimeThisTime;
|
||||
|
||||
private long vUserCount;
|
||||
|
||||
@XmlElement
|
||||
public long getTimeFrame() {
|
||||
return timeFrame;
|
||||
}
|
||||
|
||||
public void setTimeFrame(long timeFrame) {
|
||||
this.timeFrame = timeFrame;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMinResponseTime() {
|
||||
return minResponseTime;
|
||||
}
|
||||
|
||||
public void setMinResponseTime(long minResponseTime) {
|
||||
this.minResponseTime = minResponseTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMaxResponseTime() {
|
||||
return maxResponseTime;
|
||||
}
|
||||
|
||||
public void setMaxResponseTime(long maxResponseTime) {
|
||||
this.maxResponseTime = maxResponseTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getSuccessThroughputThisTime() {
|
||||
return successThroughputThisTime;
|
||||
}
|
||||
|
||||
public void setSuccessThroughputThisTime(long successThroughputThisTime) {
|
||||
this.successThroughputThisTime = successThroughputThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getSuccessCountFromBegin() {
|
||||
return successCountFromBegin;
|
||||
}
|
||||
|
||||
public void setSuccessCountFromBegin(long successCountFromBegin) {
|
||||
this.successCountFromBegin = successCountFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getFailCountFromBegin() {
|
||||
return failCountFromBegin;
|
||||
}
|
||||
|
||||
public void setFailCountFromBegin(long failCountFromBegin) {
|
||||
this.failCountFromBegin = failCountFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getFailThroughputThisTime() {
|
||||
return failThroughputThisTime;
|
||||
}
|
||||
|
||||
public void setFailThroughputThisTime(long failThroughputThisTime) {
|
||||
this.failThroughputThisTime = failThroughputThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getSuccessCountThisTime() {
|
||||
return successCountThisTime;
|
||||
}
|
||||
|
||||
public void setSuccessCountThisTime(long successCountThisTime) {
|
||||
this.successCountThisTime = successCountThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getFailCountThisTime() {
|
||||
return failCountThisTime;
|
||||
}
|
||||
|
||||
public void setFailCountThisTime(long failCountThisTime) {
|
||||
this.failCountThisTime = failCountThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTotalResponseTimeThisTime() {
|
||||
return totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setTotalResponseTimeThisTime(long totalResponseTimeThisTime) {
|
||||
this.totalResponseTimeThisTime = totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTotalSqureResponseTimeThisTime() {
|
||||
return totalSqureResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setTotalSqureResponseTimeThisTime(
|
||||
long totalSqureResponseTimeThisTime) {
|
||||
this.totalSqureResponseTimeThisTime = totalSqureResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getvUserCount() {
|
||||
return vUserCount;
|
||||
}
|
||||
|
||||
public void setvUserCount(long vUserCount) {
|
||||
this.vUserCount = vUserCount;
|
||||
}
|
||||
|
||||
// if the all the fields of target object equals with this's except
|
||||
// timeFrame,
|
||||
// We call it equals.
|
||||
@Override
|
||||
public boolean equals(Object targetObj) {
|
||||
if (!(targetObj instanceof AgentBriefStatusModel) || targetObj == null) {
|
||||
return false;
|
||||
}
|
||||
boolean result = true;
|
||||
AgentBriefStatusModel convertedObject = (AgentBriefStatusModel) targetObj;
|
||||
Field[] fs = this.getClass().getDeclaredFields();
|
||||
try {
|
||||
for (Field field : fs) {
|
||||
if (field.getName().equals("vUserCount")) {
|
||||
continue;
|
||||
}
|
||||
field.setAccessible(true);
|
||||
if (field.getLong(this) != field.getLong(convertedObject)) {
|
||||
System.out.println(field.getName()
|
||||
+ " not equals! and the target is "
|
||||
+ field.getLong(convertedObject) + " and this is "
|
||||
+ field.getLong(this));
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
result = false;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static AgentBriefStatusModel extractBriefStatusModel(String content)
|
||||
throws JAXBException {
|
||||
Unmarshaller unmarshaller = JAXBContext.newInstance(
|
||||
AgentBriefStatusModel.class).createUnmarshaller();
|
||||
return (AgentBriefStatusModel) unmarshaller
|
||||
.unmarshal(new ByteArrayInputStream(content.getBytes()));
|
||||
}
|
||||
}
|
|
@ -1,89 +1,89 @@
|
|||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AgentPageBriefModel extends DataStatisticsModel {
|
||||
private int pageId;
|
||||
private long timeFrame;
|
||||
private long countThisTime;
|
||||
private long totalResponseTimeThisTime;
|
||||
private long maxResponseTimeFromBegin;
|
||||
private long minResponseTimeFromBegin;
|
||||
private long countFromBegin;
|
||||
private long latestResponseTime;
|
||||
|
||||
@XmlElement
|
||||
public int getPageId() {
|
||||
return pageId;
|
||||
}
|
||||
|
||||
public void setPageId(int pageId) {
|
||||
this.pageId = pageId;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTimeFrame() {
|
||||
return timeFrame;
|
||||
}
|
||||
|
||||
public void setTimeFrame(long timeFrame) {
|
||||
this.timeFrame = timeFrame;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getCountThisTime() {
|
||||
return countThisTime;
|
||||
}
|
||||
|
||||
public void setCountThisTime(long countThisTime) {
|
||||
this.countThisTime = countThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTotalResponseTimeThisTime() {
|
||||
return totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setTotalResponseTimeThisTime(long totalResponseTimeThisTime) {
|
||||
this.totalResponseTimeThisTime = totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMaxResponseTimeFromBegin() {
|
||||
return maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMaxResponseTimeFromBegin(long maxResponseTimeFromBegin) {
|
||||
this.maxResponseTimeFromBegin = maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMinResponseTimeFromBegin() {
|
||||
return minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMinResponseTimeFromBegin(long minResponseTimeFromBegin) {
|
||||
this.minResponseTimeFromBegin = minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getCountFromBegin() {
|
||||
return countFromBegin;
|
||||
}
|
||||
|
||||
public void setCountFromBegin(long countFromBegin) {
|
||||
this.countFromBegin = countFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getLatestResponseTime() {
|
||||
return latestResponseTime;
|
||||
}
|
||||
|
||||
public void setLatestResponseTime(long latestTimeResponseTime) {
|
||||
this.latestResponseTime = latestTimeResponseTime;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AgentPageBriefModel extends DataStatisticsModel {
|
||||
private int pageId;
|
||||
private long timeFrame;
|
||||
private long countThisTime;
|
||||
private long totalResponseTimeThisTime;
|
||||
private long maxResponseTimeFromBegin;
|
||||
private long minResponseTimeFromBegin;
|
||||
private long countFromBegin;
|
||||
private long latestResponseTime;
|
||||
|
||||
@XmlElement
|
||||
public int getPageId() {
|
||||
return pageId;
|
||||
}
|
||||
|
||||
public void setPageId(int pageId) {
|
||||
this.pageId = pageId;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTimeFrame() {
|
||||
return timeFrame;
|
||||
}
|
||||
|
||||
public void setTimeFrame(long timeFrame) {
|
||||
this.timeFrame = timeFrame;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getCountThisTime() {
|
||||
return countThisTime;
|
||||
}
|
||||
|
||||
public void setCountThisTime(long countThisTime) {
|
||||
this.countThisTime = countThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getTotalResponseTimeThisTime() {
|
||||
return totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setTotalResponseTimeThisTime(long totalResponseTimeThisTime) {
|
||||
this.totalResponseTimeThisTime = totalResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMaxResponseTimeFromBegin() {
|
||||
return maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMaxResponseTimeFromBegin(long maxResponseTimeFromBegin) {
|
||||
this.maxResponseTimeFromBegin = maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMinResponseTimeFromBegin() {
|
||||
return minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMinResponseTimeFromBegin(long minResponseTimeFromBegin) {
|
||||
this.minResponseTimeFromBegin = minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getCountFromBegin() {
|
||||
return countFromBegin;
|
||||
}
|
||||
|
||||
public void setCountFromBegin(long countFromBegin) {
|
||||
this.countFromBegin = countFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getLatestResponseTime() {
|
||||
return latestResponseTime;
|
||||
}
|
||||
|
||||
public void setLatestResponseTime(long latestTimeResponseTime) {
|
||||
this.latestResponseTime = latestTimeResponseTime;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,24 +1,24 @@
|
|||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AgentPagesBriefModel extends DataStatisticsModel {
|
||||
private List<AgentPageBriefModel> pageBriefModels = new ArrayList<AgentPageBriefModel>();
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "singlePage")
|
||||
public List<AgentPageBriefModel> getPageBriefModels() {
|
||||
return pageBriefModels;
|
||||
}
|
||||
|
||||
public void setPageBriefModels(List<AgentPageBriefModel> pageBriefModels) {
|
||||
this.pageBriefModels = pageBriefModels;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class AgentPagesBriefModel extends DataStatisticsModel {
|
||||
private List<AgentPageBriefModel> pageBriefModels = new ArrayList<AgentPageBriefModel>();
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "singlePage")
|
||||
public List<AgentPageBriefModel> getPageBriefModels() {
|
||||
return pageBriefModels;
|
||||
}
|
||||
|
||||
public void setPageBriefModels(List<AgentPageBriefModel> pageBriefModels) {
|
||||
this.pageBriefModels = pageBriefModels;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
public abstract class DataStatisticsModel {
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.agent.statistics;
|
||||
|
||||
public abstract class DataStatisticsModel {
|
||||
|
||||
}
|
|
@ -1,43 +1,43 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.MemoryModel;
|
||||
|
||||
/**
|
||||
* When asked for memory, this will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "MonitorMemoryResponseModel")
|
||||
public class MonitorMemoryResponseModel implements MonitorResultBase {
|
||||
private List<MemoryModel> memoryModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "memoryModel")
|
||||
public List<MemoryModel> getMemoryModels() {
|
||||
return memoryModels;
|
||||
}
|
||||
|
||||
public void setMemoryModels(List<MemoryModel> memoryModels) {
|
||||
this.memoryModels = memoryModels;
|
||||
}
|
||||
|
||||
public MonitorMemoryResponseModel() {
|
||||
this.setMemoryModels(new ArrayList<MemoryModel>());
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof MemoryModel) {
|
||||
this.getMemoryModels().add((MemoryModel) model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.MemoryModel;
|
||||
|
||||
/**
|
||||
* When asked for memory, this will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "MonitorMemoryResponseModel")
|
||||
public class MonitorMemoryResponseModel implements MonitorResultBase {
|
||||
private List<MemoryModel> memoryModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "memoryModel")
|
||||
public List<MemoryModel> getMemoryModels() {
|
||||
return memoryModels;
|
||||
}
|
||||
|
||||
public void setMemoryModels(List<MemoryModel> memoryModels) {
|
||||
this.memoryModels = memoryModels;
|
||||
}
|
||||
|
||||
public MonitorMemoryResponseModel() {
|
||||
this.setMemoryModels(new ArrayList<MemoryModel>());
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof MemoryModel) {
|
||||
this.getMemoryModels().add((MemoryModel) model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,42 +1,42 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.NetworkInterfaceModel;
|
||||
|
||||
/**
|
||||
* When asked for network, this will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement
|
||||
public class MonitorNetworkReponseModel implements MonitorResultBase {
|
||||
private List<NetworkInterfaceModel> models;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "networkInterface")
|
||||
public List<NetworkInterfaceModel> getModels() {
|
||||
return models;
|
||||
}
|
||||
|
||||
public void setModels(List<NetworkInterfaceModel> models) {
|
||||
this.models = models;
|
||||
}
|
||||
|
||||
public MonitorNetworkReponseModel() {
|
||||
this.setModels(new ArrayList<NetworkInterfaceModel>());
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof NetworkInterfaceModel) {
|
||||
this.getModels().add((NetworkInterfaceModel) model);
|
||||
}
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.NetworkInterfaceModel;
|
||||
|
||||
/**
|
||||
* When asked for network, this will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement
|
||||
public class MonitorNetworkReponseModel implements MonitorResultBase {
|
||||
private List<NetworkInterfaceModel> models;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "networkInterface")
|
||||
public List<NetworkInterfaceModel> getModels() {
|
||||
return models;
|
||||
}
|
||||
|
||||
public void setModels(List<NetworkInterfaceModel> models) {
|
||||
this.models = models;
|
||||
}
|
||||
|
||||
public MonitorNetworkReponseModel() {
|
||||
this.setModels(new ArrayList<NetworkInterfaceModel>());
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof NetworkInterfaceModel) {
|
||||
this.getModels().add((NetworkInterfaceModel) model);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,43 +1,43 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.PhysicalDiskModel;
|
||||
|
||||
/**
|
||||
* When asked for logicalDisk, this model will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "MonitorPhysicDisk")
|
||||
public class MonitorPhysicalDiskResponseModel implements MonitorResultBase {
|
||||
private List<PhysicalDiskModel> physicalDiskModels;
|
||||
|
||||
public MonitorPhysicalDiskResponseModel() {
|
||||
this.setPhysicalDiskModels(new ArrayList<PhysicalDiskModel>());
|
||||
}
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "physicDisk")
|
||||
public List<PhysicalDiskModel> getPhysicalDiskModels() {
|
||||
return physicalDiskModels;
|
||||
}
|
||||
|
||||
public void setPhysicalDiskModels(List<PhysicalDiskModel> physicalDiskModels) {
|
||||
this.physicalDiskModels = physicalDiskModels;
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof PhysicalDiskModel) {
|
||||
this.getPhysicalDiskModels().add((PhysicalDiskModel) model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.PhysicalDiskModel;
|
||||
|
||||
/**
|
||||
* When asked for logicalDisk, this model will be response
|
||||
*
|
||||
* @author coderfengyun
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "MonitorPhysicDisk")
|
||||
public class MonitorPhysicalDiskResponseModel implements MonitorResultBase {
|
||||
private List<PhysicalDiskModel> physicalDiskModels;
|
||||
|
||||
public MonitorPhysicalDiskResponseModel() {
|
||||
this.setPhysicalDiskModels(new ArrayList<PhysicalDiskModel>());
|
||||
}
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "physicDisk")
|
||||
public List<PhysicalDiskModel> getPhysicalDiskModels() {
|
||||
return physicalDiskModels;
|
||||
}
|
||||
|
||||
public void setPhysicalDiskModels(List<PhysicalDiskModel> physicalDiskModels) {
|
||||
this.physicalDiskModels = physicalDiskModels;
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
if (model instanceof PhysicalDiskModel) {
|
||||
this.getPhysicalDiskModels().add((PhysicalDiskModel) model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
|
||||
public interface MonitorResultBase {
|
||||
public void add(SampleModel model);
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
|
||||
public interface MonitorResultBase {
|
||||
public void add(SampleModel model);
|
||||
}
|
|
@ -1,55 +1,55 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bench4q.share.models.monitor.MemoryModel;
|
||||
import org.bench4q.share.models.monitor.NetworkInterfaceModel;
|
||||
import org.bench4q.share.models.monitor.PhysicalDiskModel;
|
||||
import org.bench4q.share.models.monitor.ProcessorModel;
|
||||
|
||||
public class MonitorResultContainerModel {
|
||||
private List<PhysicalDiskModel> logicalDiskModels;
|
||||
private List<MemoryModel> memoryModels;
|
||||
private List<ProcessorModel> processorModels;
|
||||
private List<NetworkInterfaceModel> netWorkModels;
|
||||
|
||||
public List<PhysicalDiskModel> getLogicalDiskModels() {
|
||||
return logicalDiskModels;
|
||||
}
|
||||
|
||||
public void setLogicalDiskModels(List<PhysicalDiskModel> logicalDiskModels) {
|
||||
this.logicalDiskModels = logicalDiskModels;
|
||||
}
|
||||
|
||||
public List<MemoryModel> getMemoryModels() {
|
||||
return memoryModels;
|
||||
}
|
||||
|
||||
public void setMemoryModels(List<MemoryModel> memoryModels) {
|
||||
this.memoryModels = memoryModels;
|
||||
}
|
||||
|
||||
public List<ProcessorModel> getProcessorModels() {
|
||||
return processorModels;
|
||||
}
|
||||
|
||||
public void setProcessorModels(List<ProcessorModel> processorModels) {
|
||||
this.processorModels = processorModels;
|
||||
}
|
||||
|
||||
public List<NetworkInterfaceModel> getNetWorkModels() {
|
||||
return netWorkModels;
|
||||
}
|
||||
|
||||
public void setNetWorkModels(List<NetworkInterfaceModel> netWorkModels) {
|
||||
this.netWorkModels = netWorkModels;
|
||||
}
|
||||
|
||||
public MonitorResultContainerModel() {
|
||||
this.setLogicalDiskModels(new ArrayList<PhysicalDiskModel>());
|
||||
this.setMemoryModels(new ArrayList<MemoryModel>());
|
||||
this.setProcessorModels(new ArrayList<ProcessorModel>());
|
||||
this.setNetWorkModels(new ArrayList<NetworkInterfaceModel>());
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bench4q.share.models.monitor.MemoryModel;
|
||||
import org.bench4q.share.models.monitor.NetworkInterfaceModel;
|
||||
import org.bench4q.share.models.monitor.PhysicalDiskModel;
|
||||
import org.bench4q.share.models.monitor.ProcessorModel;
|
||||
|
||||
public class MonitorResultContainerModel {
|
||||
private List<PhysicalDiskModel> logicalDiskModels;
|
||||
private List<MemoryModel> memoryModels;
|
||||
private List<ProcessorModel> processorModels;
|
||||
private List<NetworkInterfaceModel> netWorkModels;
|
||||
|
||||
public List<PhysicalDiskModel> getLogicalDiskModels() {
|
||||
return logicalDiskModels;
|
||||
}
|
||||
|
||||
public void setLogicalDiskModels(List<PhysicalDiskModel> logicalDiskModels) {
|
||||
this.logicalDiskModels = logicalDiskModels;
|
||||
}
|
||||
|
||||
public List<MemoryModel> getMemoryModels() {
|
||||
return memoryModels;
|
||||
}
|
||||
|
||||
public void setMemoryModels(List<MemoryModel> memoryModels) {
|
||||
this.memoryModels = memoryModels;
|
||||
}
|
||||
|
||||
public List<ProcessorModel> getProcessorModels() {
|
||||
return processorModels;
|
||||
}
|
||||
|
||||
public void setProcessorModels(List<ProcessorModel> processorModels) {
|
||||
this.processorModels = processorModels;
|
||||
}
|
||||
|
||||
public List<NetworkInterfaceModel> getNetWorkModels() {
|
||||
return netWorkModels;
|
||||
}
|
||||
|
||||
public void setNetWorkModels(List<NetworkInterfaceModel> netWorkModels) {
|
||||
this.netWorkModels = netWorkModels;
|
||||
}
|
||||
|
||||
public MonitorResultContainerModel() {
|
||||
this.setLogicalDiskModels(new ArrayList<PhysicalDiskModel>());
|
||||
this.setMemoryModels(new ArrayList<MemoryModel>());
|
||||
this.setProcessorModels(new ArrayList<ProcessorModel>());
|
||||
this.setNetWorkModels(new ArrayList<NetworkInterfaceModel>());
|
||||
}
|
||||
}
|
|
@ -1,37 +1,37 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.ProcessModel;
|
||||
|
||||
public class ProcessResponseModel implements MonitorResultBase {
|
||||
|
||||
private List<ProcessModel> processModels;
|
||||
|
||||
public ProcessResponseModel() {
|
||||
this.setProcessModels(new ArrayList<ProcessModel>());
|
||||
}
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "processModel")
|
||||
public List<ProcessModel> getProcessModels() {
|
||||
return processModels;
|
||||
}
|
||||
|
||||
public void setProcessModels(List<ProcessModel> processModels) {
|
||||
this.processModels = processModels;
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
// TODO Auto-generated method stub
|
||||
if (model instanceof ProcessModel) {
|
||||
this.getProcessModels().add((ProcessModel) model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.SampleModel;
|
||||
import org.bench4q.share.models.monitor.ProcessModel;
|
||||
|
||||
public class ProcessResponseModel implements MonitorResultBase {
|
||||
|
||||
private List<ProcessModel> processModels;
|
||||
|
||||
public ProcessResponseModel() {
|
||||
this.setProcessModels(new ArrayList<ProcessModel>());
|
||||
}
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement(name = "processModel")
|
||||
public List<ProcessModel> getProcessModels() {
|
||||
return processModels;
|
||||
}
|
||||
|
||||
public void setProcessModels(List<ProcessModel> processModels) {
|
||||
this.processModels = processModels;
|
||||
}
|
||||
|
||||
public void add(SampleModel model) {
|
||||
// TODO Auto-generated method stub
|
||||
if (model instanceof ProcessModel) {
|
||||
this.getProcessModels().add((ProcessModel) model);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,27 +1,27 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "scriptProcessModel")
|
||||
public class ResultLoadModel {
|
||||
private List<ValueTimeModel> valueTimeModels;
|
||||
|
||||
@XmlElementWrapper(name = "valueTimeModels")
|
||||
@XmlElement(name = "valueTimeModel")
|
||||
public List<ValueTimeModel> getValueTimeModels() {
|
||||
return valueTimeModels;
|
||||
}
|
||||
|
||||
public void setValueTimeModels(List<ValueTimeModel> valueTimeModels) {
|
||||
this.valueTimeModels = valueTimeModels;
|
||||
}
|
||||
|
||||
public ResultLoadModel() {
|
||||
this.setValueTimeModels(new ArrayList<ValueTimeModel>());
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "scriptProcessModel")
|
||||
public class ResultLoadModel {
|
||||
private List<ValueTimeModel> valueTimeModels;
|
||||
|
||||
@XmlElementWrapper(name = "valueTimeModels")
|
||||
@XmlElement(name = "valueTimeModel")
|
||||
public List<ValueTimeModel> getValueTimeModels() {
|
||||
return valueTimeModels;
|
||||
}
|
||||
|
||||
public void setValueTimeModels(List<ValueTimeModel> valueTimeModels) {
|
||||
this.valueTimeModels = valueTimeModels;
|
||||
}
|
||||
|
||||
public ResultLoadModel() {
|
||||
this.setValueTimeModels(new ArrayList<ValueTimeModel>());
|
||||
}
|
||||
}
|
|
@ -1,95 +1,95 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.RunScenarioModel;
|
||||
|
||||
@XmlRootElement(name = "runningScripModel")
|
||||
public class RunningScriptModel {
|
||||
private int scriptId;
|
||||
private int requireLoad;
|
||||
private TestScriptConfig config;
|
||||
private RunScenarioModel scenarioModel;
|
||||
private String scriptName;
|
||||
private boolean finished;
|
||||
private List<RunningAgentModel> runningAgentModels = new ArrayList<RunningAgentModel>();
|
||||
private UUID testPlanID;
|
||||
|
||||
@XmlElement
|
||||
public int getScriptId() {
|
||||
return scriptId;
|
||||
}
|
||||
|
||||
public void setScriptId(int scriptId) {
|
||||
this.scriptId = scriptId;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public int getRequireLoad() {
|
||||
return requireLoad;
|
||||
}
|
||||
|
||||
public void setRequireLoad(int requireLoad) {
|
||||
this.requireLoad = requireLoad;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public TestScriptConfig getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfig(TestScriptConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public RunScenarioModel getScenarioModel() {
|
||||
return scenarioModel;
|
||||
}
|
||||
|
||||
public void setScenarioModel(RunScenarioModel scenarioModel) {
|
||||
this.scenarioModel = scenarioModel;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getScriptName() {
|
||||
return scriptName;
|
||||
}
|
||||
|
||||
public void setScriptName(String scriptName) {
|
||||
this.scriptName = scriptName;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "runningAgentList")
|
||||
@XmlElement
|
||||
public List<RunningAgentModel> getRunningAgentModels() {
|
||||
return runningAgentModels;
|
||||
}
|
||||
|
||||
public void setRunningAgentModels(List<RunningAgentModel> runningAgentModels) {
|
||||
this.runningAgentModels = runningAgentModels;
|
||||
}
|
||||
|
||||
public UUID getTestPlanID() {
|
||||
return testPlanID;
|
||||
}
|
||||
|
||||
public void setTestPlanID(UUID testPlanID) {
|
||||
this.testPlanID = testPlanID;
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.RunScenarioModel;
|
||||
|
||||
@XmlRootElement(name = "runningScripModel")
|
||||
public class RunningScriptModel {
|
||||
private int scriptId;
|
||||
private int requireLoad;
|
||||
private TestScriptConfig config;
|
||||
private RunScenarioModel scenarioModel;
|
||||
private String scriptName;
|
||||
private boolean finished;
|
||||
private List<RunningAgentModel> runningAgentModels = new ArrayList<RunningAgentModel>();
|
||||
private UUID testPlanID;
|
||||
|
||||
@XmlElement
|
||||
public int getScriptId() {
|
||||
return scriptId;
|
||||
}
|
||||
|
||||
public void setScriptId(int scriptId) {
|
||||
this.scriptId = scriptId;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public int getRequireLoad() {
|
||||
return requireLoad;
|
||||
}
|
||||
|
||||
public void setRequireLoad(int requireLoad) {
|
||||
this.requireLoad = requireLoad;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public TestScriptConfig getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfig(TestScriptConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public RunScenarioModel getScenarioModel() {
|
||||
return scenarioModel;
|
||||
}
|
||||
|
||||
public void setScenarioModel(RunScenarioModel scenarioModel) {
|
||||
this.scenarioModel = scenarioModel;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getScriptName() {
|
||||
return scriptName;
|
||||
}
|
||||
|
||||
public void setScriptName(String scriptName) {
|
||||
this.scriptName = scriptName;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "runningAgentList")
|
||||
@XmlElement
|
||||
public List<RunningAgentModel> getRunningAgentModels() {
|
||||
return runningAgentModels;
|
||||
}
|
||||
|
||||
public void setRunningAgentModels(List<RunningAgentModel> runningAgentModels) {
|
||||
this.runningAgentModels = runningAgentModels;
|
||||
}
|
||||
|
||||
public UUID getTestPlanID() {
|
||||
return testPlanID;
|
||||
}
|
||||
|
||||
public void setTestPlanID(UUID testPlanID) {
|
||||
this.testPlanID = testPlanID;
|
||||
}
|
||||
}
|
|
@ -1,26 +1,26 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.ScriptBehaviorsBriefModel;
|
||||
|
||||
@XmlRootElement
|
||||
public class TestPlanBehaviorsBriefResultModel {
|
||||
private List<ScriptBehaviorsBriefModel> scriptBehaviorsBriefModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
public List<ScriptBehaviorsBriefModel> getScriptBehaviorsBriefModels() {
|
||||
return scriptBehaviorsBriefModels;
|
||||
}
|
||||
|
||||
public void setScriptBehaviorsBriefModels(
|
||||
List<ScriptBehaviorsBriefModel> scriptBehaviorsBriefModels) {
|
||||
this.scriptBehaviorsBriefModels = scriptBehaviorsBriefModels;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.ScriptBehaviorsBriefModel;
|
||||
|
||||
@XmlRootElement
|
||||
public class TestPlanBehaviorsBriefResultModel {
|
||||
private List<ScriptBehaviorsBriefModel> scriptBehaviorsBriefModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
public List<ScriptBehaviorsBriefModel> getScriptBehaviorsBriefModels() {
|
||||
return scriptBehaviorsBriefModels;
|
||||
}
|
||||
|
||||
public void setScriptBehaviorsBriefModels(
|
||||
List<ScriptBehaviorsBriefModel> scriptBehaviorsBriefModels) {
|
||||
this.scriptBehaviorsBriefModels = scriptBehaviorsBriefModels;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,26 +1,26 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.ScriptBriefResultModel;
|
||||
|
||||
@XmlRootElement
|
||||
public class TestPlanScriptBriefResultModel {
|
||||
private List<ScriptBriefResultModel> scriptBriefResultModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
public List<ScriptBriefResultModel> getScriptBriefResultModels() {
|
||||
return scriptBriefResultModels;
|
||||
}
|
||||
|
||||
public void setScriptBriefResultModels(
|
||||
List<ScriptBriefResultModel> scriptBriefResultModels) {
|
||||
this.scriptBriefResultModels = scriptBriefResultModels;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.master.statistics.ScriptBriefResultModel;
|
||||
|
||||
@XmlRootElement
|
||||
public class TestPlanScriptBriefResultModel {
|
||||
private List<ScriptBriefResultModel> scriptBriefResultModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
public List<ScriptBriefResultModel> getScriptBriefResultModels() {
|
||||
return scriptBriefResultModels;
|
||||
}
|
||||
|
||||
public void setScriptBriefResultModels(
|
||||
List<ScriptBriefResultModel> scriptBriefResultModels) {
|
||||
this.scriptBriefResultModels = scriptBriefResultModels;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,37 +1,37 @@
|
|||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ValueTimeModel {
|
||||
private long value;
|
||||
private Date time;
|
||||
|
||||
@XmlElement
|
||||
public long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public static ValueTimeModel buildValueTimeModel(long value, Date time) {
|
||||
ValueTimeModel result = new ValueTimeModel();
|
||||
result.setValue(value);
|
||||
result.setTime(time);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ValueTimeModel {
|
||||
private long value;
|
||||
private Date time;
|
||||
|
||||
@XmlElement
|
||||
public long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public Date getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(Date time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public static ValueTimeModel buildValueTimeModel(long value, Date time) {
|
||||
ValueTimeModel result = new ValueTimeModel();
|
||||
result.setValue(value);
|
||||
result.setTime(time);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -1,35 +1,35 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class MethodModel {
|
||||
private Set<MethodParamModel> methodParams;
|
||||
|
||||
private String name;
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@XmlElementWrapper(name = "params")
|
||||
@XmlElement(name = "param", type = MethodParamModel.class)
|
||||
public Set<MethodParamModel> getMethodParams() {
|
||||
return methodParams;
|
||||
}
|
||||
|
||||
public void setMethodParams(Set<MethodParamModel> methodParams) {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class MethodModel {
|
||||
private Set<MethodParamModel> methodParams;
|
||||
|
||||
private String name;
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@XmlElementWrapper(name = "params")
|
||||
@XmlElement(name = "param", type = MethodParamModel.class)
|
||||
public Set<MethodParamModel> getMethodParams() {
|
||||
return methodParams;
|
||||
}
|
||||
|
||||
public void setMethodParams(Set<MethodParamModel> methodParams) {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,69 +1,69 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class MethodParamModel {
|
||||
private String name;
|
||||
private String lable;
|
||||
private ParamTypeEnum paramType;
|
||||
private String valueSeperator = ";";
|
||||
private String fieldSeperator = ",";
|
||||
private Set<MethodParamPropertyModel> methodParamProperties;
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
public void setLable(String lable) {
|
||||
this.lable = lable;
|
||||
}
|
||||
@XmlElement
|
||||
public ParamTypeEnum getParamType() {
|
||||
return paramType;
|
||||
}
|
||||
|
||||
public void setParamType(ParamTypeEnum paramType) {
|
||||
this.paramType = paramType;
|
||||
}
|
||||
@XmlElement
|
||||
public String getValueSeperator() {
|
||||
return valueSeperator;
|
||||
}
|
||||
|
||||
public void setValueSeperator(String valueSeperator) {
|
||||
this.valueSeperator = valueSeperator;
|
||||
}
|
||||
@XmlElement
|
||||
public String getFieldSeperator() {
|
||||
return fieldSeperator;
|
||||
}
|
||||
|
||||
public void setFieldSeperator(String fieldSeperator) {
|
||||
this.fieldSeperator = fieldSeperator;
|
||||
}
|
||||
@XmlElement
|
||||
public Set<MethodParamPropertyModel> getMethodParamProperties() {
|
||||
return methodParamProperties;
|
||||
}
|
||||
|
||||
public void setMethodParamProperties(
|
||||
Set<MethodParamPropertyModel> methodParamProperties) {
|
||||
this.methodParamProperties = methodParamProperties;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class MethodParamModel {
|
||||
private String name;
|
||||
private String lable;
|
||||
private ParamTypeEnum paramType;
|
||||
private String valueSeperator = ";";
|
||||
private String fieldSeperator = ",";
|
||||
private Set<MethodParamPropertyModel> methodParamProperties;
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getLable() {
|
||||
return lable;
|
||||
}
|
||||
|
||||
public void setLable(String lable) {
|
||||
this.lable = lable;
|
||||
}
|
||||
@XmlElement
|
||||
public ParamTypeEnum getParamType() {
|
||||
return paramType;
|
||||
}
|
||||
|
||||
public void setParamType(ParamTypeEnum paramType) {
|
||||
this.paramType = paramType;
|
||||
}
|
||||
@XmlElement
|
||||
public String getValueSeperator() {
|
||||
return valueSeperator;
|
||||
}
|
||||
|
||||
public void setValueSeperator(String valueSeperator) {
|
||||
this.valueSeperator = valueSeperator;
|
||||
}
|
||||
@XmlElement
|
||||
public String getFieldSeperator() {
|
||||
return fieldSeperator;
|
||||
}
|
||||
|
||||
public void setFieldSeperator(String fieldSeperator) {
|
||||
this.fieldSeperator = fieldSeperator;
|
||||
}
|
||||
@XmlElement
|
||||
public Set<MethodParamPropertyModel> getMethodParamProperties() {
|
||||
return methodParamProperties;
|
||||
}
|
||||
|
||||
public void setMethodParamProperties(
|
||||
Set<MethodParamPropertyModel> methodParamProperties) {
|
||||
this.methodParamProperties = methodParamProperties;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,30 +1,30 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class MethodParamPropertyModel {
|
||||
|
||||
private String key;
|
||||
private String value;
|
||||
|
||||
@XmlElement
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class MethodParamPropertyModel {
|
||||
|
||||
private String key;
|
||||
private String value;
|
||||
|
||||
@XmlElement
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
public enum ParamTypeEnum {
|
||||
Field, MultiField, CheckBox, Table
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
public enum ParamTypeEnum {
|
||||
Field, MultiField, CheckBox, Table
|
||||
|
||||
}
|
|
@ -1,20 +1,20 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "GUI")
|
||||
public class PluginGUI {
|
||||
|
||||
private PluginModel plugin;
|
||||
|
||||
@XmlElement(name = "plugin name")
|
||||
public PluginModel getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public void setPlugin(PluginModel plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement(name = "GUI")
|
||||
public class PluginGUI {
|
||||
|
||||
private PluginModel plugin;
|
||||
|
||||
@XmlElement(name = "plugin name")
|
||||
public PluginModel getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public void setPlugin(PluginModel plugin) {
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +1,33 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class PluginModel {
|
||||
private Set<MethodModel> methods;
|
||||
private String name;
|
||||
|
||||
@XmlElementWrapper(name = "methods")
|
||||
@XmlElement(name = "method", type = MethodModel.class)
|
||||
public Set<MethodModel> getMethods() {
|
||||
return methods;
|
||||
}
|
||||
|
||||
public void setMethods(Set<MethodModel> methods) {
|
||||
this.methods = methods;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class PluginModel {
|
||||
private Set<MethodModel> methods;
|
||||
private String name;
|
||||
|
||||
@XmlElementWrapper(name = "methods")
|
||||
@XmlElement(name = "method", type = MethodModel.class)
|
||||
public Set<MethodModel> getMethods() {
|
||||
return methods;
|
||||
}
|
||||
|
||||
public void setMethods(Set<MethodModel> methods) {
|
||||
this.methods = methods;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,66 +1,66 @@
|
|||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class PluginResponseModel {
|
||||
|
||||
private boolean success;
|
||||
private List<String> pluginList;
|
||||
private List<String> methodList;
|
||||
private Set<MethodParamModel> methosMethodParamModels;
|
||||
private String failMessage;
|
||||
|
||||
@XmlElement
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public List<String> getPluginList() {
|
||||
return pluginList;
|
||||
}
|
||||
|
||||
public void setPluginList(List<String> pluginList) {
|
||||
this.pluginList = pluginList;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public List<String> getMethodList() {
|
||||
return methodList;
|
||||
}
|
||||
|
||||
public void setMethodList(List<String> methodList) {
|
||||
this.methodList = methodList;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "methodParamList")
|
||||
@XmlElement(name = "methodParam", type = MethodParamModel.class)
|
||||
public Set<MethodParamModel> getMethosMethodParamModels() {
|
||||
return methosMethodParamModels;
|
||||
}
|
||||
|
||||
public void setMethosMethodParamModels(
|
||||
Set<MethodParamModel> methosMethodParamModels) {
|
||||
this.methosMethodParamModels = methosMethodParamModels;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getFailMessage() {
|
||||
return failMessage;
|
||||
}
|
||||
|
||||
public void setFailMessage(String failMessage) {
|
||||
this.failMessage = failMessage;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.plugin;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class PluginResponseModel {
|
||||
|
||||
private boolean success;
|
||||
private List<String> pluginList;
|
||||
private List<String> methodList;
|
||||
private Set<MethodParamModel> methosMethodParamModels;
|
||||
private String failMessage;
|
||||
|
||||
@XmlElement
|
||||
public boolean isSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public List<String> getPluginList() {
|
||||
return pluginList;
|
||||
}
|
||||
|
||||
public void setPluginList(List<String> pluginList) {
|
||||
this.pluginList = pluginList;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public List<String> getMethodList() {
|
||||
return methodList;
|
||||
}
|
||||
|
||||
public void setMethodList(List<String> methodList) {
|
||||
this.methodList = methodList;
|
||||
}
|
||||
|
||||
@XmlElementWrapper(name = "methodParamList")
|
||||
@XmlElement(name = "methodParam", type = MethodParamModel.class)
|
||||
public Set<MethodParamModel> getMethosMethodParamModels() {
|
||||
return methosMethodParamModels;
|
||||
}
|
||||
|
||||
public void setMethosMethodParamModels(
|
||||
Set<MethodParamModel> methosMethodParamModels) {
|
||||
this.methosMethodParamModels = methosMethodParamModels;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public String getFailMessage() {
|
||||
return failMessage;
|
||||
}
|
||||
|
||||
public void setFailMessage(String failMessage) {
|
||||
this.failMessage = failMessage;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,21 +1,21 @@
|
|||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public abstract class SampleModel {
|
||||
protected Date samplingTime;
|
||||
|
||||
@XmlElement
|
||||
public Date getSamplingTime() {
|
||||
return samplingTime;
|
||||
}
|
||||
|
||||
public void setSamplingTime(Date samplingTime) {
|
||||
this.samplingTime = samplingTime;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public abstract class SampleModel {
|
||||
protected Date samplingTime;
|
||||
|
||||
@XmlElement
|
||||
public Date getSamplingTime() {
|
||||
return samplingTime;
|
||||
}
|
||||
|
||||
public void setSamplingTime(Date samplingTime) {
|
||||
this.samplingTime = samplingTime;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,32 +1,32 @@
|
|||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.statistics.AgentBehaviorsBriefModel;
|
||||
|
||||
@XmlRootElement(name = "scriptBehaviorsBriefModel")
|
||||
public class ScriptBehaviorsBriefModel extends SampleModel {
|
||||
private boolean finished;
|
||||
private AgentBehaviorsBriefModel testBehaviorsBriefModel;
|
||||
|
||||
@XmlElement
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public AgentBehaviorsBriefModel getTestBehaviorsBriefModel() {
|
||||
return testBehaviorsBriefModel;
|
||||
}
|
||||
|
||||
public void setTestBehaviorsBriefModel(
|
||||
AgentBehaviorsBriefModel testBehaviorsBriefModel) {
|
||||
this.testBehaviorsBriefModel = testBehaviorsBriefModel;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.bench4q.share.models.agent.statistics.AgentBehaviorsBriefModel;
|
||||
|
||||
@XmlRootElement(name = "scriptBehaviorsBriefModel")
|
||||
public class ScriptBehaviorsBriefModel extends SampleModel {
|
||||
private boolean finished;
|
||||
private AgentBehaviorsBriefModel testBehaviorsBriefModel;
|
||||
|
||||
@XmlElement
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public AgentBehaviorsBriefModel getTestBehaviorsBriefModel() {
|
||||
return testBehaviorsBriefModel;
|
||||
}
|
||||
|
||||
public void setTestBehaviorsBriefModel(
|
||||
AgentBehaviorsBriefModel testBehaviorsBriefModel) {
|
||||
this.testBehaviorsBriefModel = testBehaviorsBriefModel;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,87 +1,87 @@
|
|||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ScriptPageBriefModel extends SampleModel {
|
||||
private boolean finished;
|
||||
private long countFromBegin;
|
||||
private long maxResponseTimeFromBegin;
|
||||
private long minResponseTimeFromBegin;
|
||||
private long averageResponseTimeThisTime;
|
||||
private long latestResponseTime;
|
||||
private long throughputThisTime;
|
||||
public long totalResponseTimeThisTime;
|
||||
|
||||
@XmlElement
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getCountFromBegin() {
|
||||
return countFromBegin;
|
||||
}
|
||||
|
||||
public void setCountFromBegin(long countFromBegin) {
|
||||
this.countFromBegin = countFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMaxResponseTimeFromBegin() {
|
||||
return maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMaxResponseTimeFromBegin(long maxResponseTimeFromBegin) {
|
||||
this.maxResponseTimeFromBegin = maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMinResponseTimeFromBegin() {
|
||||
return minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMinResponseTimeFromBegin(long minResponseTimeFromBegin) {
|
||||
this.minResponseTimeFromBegin = minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getAverageResponseTimeThisTime() {
|
||||
return averageResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setAverageResponseTimeThisTime(long averageResponseTimeThisTime) {
|
||||
this.averageResponseTimeThisTime = averageResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getLatestResponseTime() {
|
||||
return latestResponseTime;
|
||||
}
|
||||
|
||||
public void setLatestResponseTime(long latestResponseTime) {
|
||||
this.latestResponseTime = latestResponseTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getThroughputThisTime() {
|
||||
return throughputThisTime;
|
||||
}
|
||||
|
||||
public void setThroughputThisTime(long throughputThisTime) {
|
||||
this.throughputThisTime = throughputThisTime;
|
||||
}
|
||||
|
||||
public static ScriptPageBriefModel buildInitialModel() {
|
||||
ScriptPageBriefModel scriptPageBriefModel = new ScriptPageBriefModel();
|
||||
scriptPageBriefModel.setMaxResponseTimeFromBegin(Long.MIN_VALUE);
|
||||
scriptPageBriefModel.setMinResponseTimeFromBegin(Long.MAX_VALUE);
|
||||
return scriptPageBriefModel;
|
||||
}
|
||||
|
||||
}
|
||||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ScriptPageBriefModel extends SampleModel {
|
||||
private boolean finished;
|
||||
private long countFromBegin;
|
||||
private long maxResponseTimeFromBegin;
|
||||
private long minResponseTimeFromBegin;
|
||||
private long averageResponseTimeThisTime;
|
||||
private long latestResponseTime;
|
||||
private long throughputThisTime;
|
||||
public long totalResponseTimeThisTime;
|
||||
|
||||
@XmlElement
|
||||
public boolean isFinished() {
|
||||
return finished;
|
||||
}
|
||||
|
||||
public void setFinished(boolean finished) {
|
||||
this.finished = finished;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getCountFromBegin() {
|
||||
return countFromBegin;
|
||||
}
|
||||
|
||||
public void setCountFromBegin(long countFromBegin) {
|
||||
this.countFromBegin = countFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMaxResponseTimeFromBegin() {
|
||||
return maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMaxResponseTimeFromBegin(long maxResponseTimeFromBegin) {
|
||||
this.maxResponseTimeFromBegin = maxResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getMinResponseTimeFromBegin() {
|
||||
return minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
public void setMinResponseTimeFromBegin(long minResponseTimeFromBegin) {
|
||||
this.minResponseTimeFromBegin = minResponseTimeFromBegin;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getAverageResponseTimeThisTime() {
|
||||
return averageResponseTimeThisTime;
|
||||
}
|
||||
|
||||
public void setAverageResponseTimeThisTime(long averageResponseTimeThisTime) {
|
||||
this.averageResponseTimeThisTime = averageResponseTimeThisTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getLatestResponseTime() {
|
||||
return latestResponseTime;
|
||||
}
|
||||
|
||||
public void setLatestResponseTime(long latestResponseTime) {
|
||||
this.latestResponseTime = latestResponseTime;
|
||||
}
|
||||
|
||||
@XmlElement
|
||||
public long getThroughputThisTime() {
|
||||
return throughputThisTime;
|
||||
}
|
||||
|
||||
public void setThroughputThisTime(long throughputThisTime) {
|
||||
this.throughputThisTime = throughputThisTime;
|
||||
}
|
||||
|
||||
public static ScriptPageBriefModel buildInitialModel() {
|
||||
ScriptPageBriefModel scriptPageBriefModel = new ScriptPageBriefModel();
|
||||
scriptPageBriefModel.setMaxResponseTimeFromBegin(Long.MIN_VALUE);
|
||||
scriptPageBriefModel.setMinResponseTimeFromBegin(Long.MAX_VALUE);
|
||||
return scriptPageBriefModel;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,30 +1,30 @@
|
|||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ScriptPagesBriefModel extends SampleModel {
|
||||
private List<ScriptPageBriefModel> scriptPageBriefModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
public List<ScriptPageBriefModel> getScriptPageBriefModels() {
|
||||
return scriptPageBriefModels;
|
||||
}
|
||||
|
||||
public void setScriptPageBriefModels(
|
||||
List<ScriptPageBriefModel> scriptPageBriefModels) {
|
||||
this.scriptPageBriefModels = scriptPageBriefModels;
|
||||
}
|
||||
|
||||
public ScriptPagesBriefModel() {
|
||||
this.setScriptPageBriefModels(new ArrayList<ScriptPageBriefModel>());
|
||||
this.setSamplingTime(new Date());
|
||||
}
|
||||
}
|
||||
package org.bench4q.share.models.master.statistics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
@XmlRootElement
|
||||
public class ScriptPagesBriefModel extends SampleModel {
|
||||
private List<ScriptPageBriefModel> scriptPageBriefModels;
|
||||
|
||||
@XmlElementWrapper
|
||||
@XmlElement
|
||||
public List<ScriptPageBriefModel> getScriptPageBriefModels() {
|
||||
return scriptPageBriefModels;
|
||||
}
|
||||
|
||||
public void setScriptPageBriefModels(
|
||||
List<ScriptPageBriefModel> scriptPageBriefModels) {
|
||||
this.scriptPageBriefModels = scriptPageBriefModels;
|
||||
}
|
||||
|
||||
public ScriptPagesBriefModel() {
|
||||
this.setScriptPageBriefModels(new ArrayList<ScriptPageBriefModel>());
|
||||
this.setSamplingTime(new Date());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue