Merge branch 'master' of https://github.com/lostcharlie/Bench4Q.git
This commit is contained in:
commit
6a192c9c4a
|
@ -1,6 +1,7 @@
|
|||
package org.bench4q.agent.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -87,6 +88,7 @@ public class TestController {
|
|||
try {
|
||||
this.getParamFileCollector().collectParamFiles(files, runId);
|
||||
System.out.println(scenarioModel);
|
||||
logger.info("Real start time is:" + new Date(realStartTime));
|
||||
RunScenarioModel runScenarioModel = MarshalHelper.unmarshal(
|
||||
RunScenarioModel.class, scenarioModel);
|
||||
System.out.println(scheduleContent);
|
||||
|
@ -166,6 +168,9 @@ public class TestController {
|
|||
.getBehaviorBriefResult(scenarioContext
|
||||
.getDataCollector());
|
||||
logger.info(pluginImplementBehavior.getId());
|
||||
if (briefModel == null) {
|
||||
continue;
|
||||
}
|
||||
briefModel.setBehaviorUrl(pluginImplementBehavior
|
||||
.getSpecificParamValue("url"));
|
||||
behaviorBriefModels.add(briefModel);
|
||||
|
|
|
@ -91,13 +91,15 @@ public class Schedule extends Observable {
|
|||
* @return get the segment by binary search
|
||||
*/
|
||||
public Segment getSegment(long timeInMilliSecond) {
|
||||
if (this.getSegments() == null
|
||||
|| this.getSegments().size() < 1
|
||||
|| timeInMilliSecond < this.getSegments().get(0).start
|
||||
.getTimeInMilliSecond()) {
|
||||
if (this.getSegments() == null || this.getSegments().size() < 1) {
|
||||
throw new Bench4QRunTimeException(
|
||||
"can't getSegment when segments' size is LT 1");
|
||||
}
|
||||
if (timeInMilliSecond < this.getSegments().get(0).start
|
||||
.getTimeInMilliSecond()) {
|
||||
throw new Bench4QRunTimeException(
|
||||
"can't getSegment when timeInMilliSecond LT 0-segment's start");
|
||||
}
|
||||
if (timeInMilliSecond >= this.getSegments().get(
|
||||
this.getSegments().size() - 1).end.getTimeInMilliSecond()) {
|
||||
this.reachEnd();
|
||||
|
|
Loading…
Reference in New Issue