parent
fc9222c104
commit
3c25415a9a
|
@ -24,7 +24,7 @@ public interface RunningScriptInterface {
|
|||
|
||||
public boolean stop();
|
||||
|
||||
public List<TestPlanScriptResult> doAfterRun(Date sampleTime);
|
||||
public List<TestPlanScriptResult> sample(Date sampleTime);
|
||||
|
||||
public Date getStartTime();
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ public class TestPlan implements IAggregate {
|
|||
List<Object> resultList = new LinkedList<Object>();
|
||||
for (TestPlanScript testPlanScript : getTestPlanScripts()) {
|
||||
List<TestPlanScriptResult> testPlanScriptResults = testPlanScript
|
||||
.doAfterRun(sampleTime);
|
||||
.sample(sampleTime);
|
||||
if (testPlanScriptResults != null)
|
||||
resultList.addAll(testPlanScriptResults);
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ public class TestPlanScript implements RunningScriptInterface {
|
|||
.unmodifiableCollection(this.getRunningAgentsDB())));
|
||||
}
|
||||
|
||||
public List<TestPlanScriptResult> doAfterRun(Date sampleTime) {
|
||||
public List<TestPlanScriptResult> sample(Date sampleTime) {
|
||||
try {
|
||||
ScriptResultModel scriptResultModel = this.getSampler()
|
||||
.getResultModelFromAgent();
|
||||
|
|
|
@ -106,7 +106,7 @@ public class Test_TestResultSave extends TestBase_MakeUpTestPlan {
|
|||
testPlan.getCurrentStatus());
|
||||
testPlanScript = getOneTestPlanScript(testPlan);
|
||||
List<Object> resultList = new ArrayList<Object>();
|
||||
resultList.addAll(testPlanScript.doAfterRun(new Date()));
|
||||
resultList.addAll(testPlanScript.sample(new Date()));
|
||||
this.getTestResultSave().update(testPlan, resultList);
|
||||
testPlanFromRepo = this.getTestPlanRepository().getTestPlanInDomainBy(
|
||||
this.getTestPlanRunIdUuid());
|
||||
|
|
|
@ -39,12 +39,11 @@ public class ScheduleModel {
|
|||
if (this.points.size() == 0) {
|
||||
return 0;
|
||||
}
|
||||
long startTime = this.points.get(0).getTimeInSecond(), endTime = startTime;
|
||||
long endTime = this.points.get(0).getTimeInSecond();
|
||||
for (PointModel point : this.getPoints()) {
|
||||
startTime = Math.min(point.getTimeInSecond(), startTime);
|
||||
endTime = Math.max(point.getTimeInSecond(), endTime);
|
||||
}
|
||||
return endTime - startTime;
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public int getMaxLoad() {
|
||||
|
|
Loading…
Reference in New Issue