1 package Analysis.Scheduling;
3 import java.util.Queue;
5 public class TransTaskSimulator extends TaskSimulator {
6 private int targetCoreNum;
7 private Queue<ObjectInfo> newObjs;
9 public TransTaskSimulator(CoreSimulator cs, int targetCoreNum, Queue<ObjectInfo> nobjs) {
11 this.targetCoreNum = targetCoreNum;
15 public void process() {
16 if(this.currentRun == null) {
17 this.currentRun = new ExeResult();
20 this.currentRun.finishTime = 1 * sizeof(this.newObjs.peek().obj.getCd());
23 public ObjectInfo refreshTask() {
24 return this.newObjs.poll();
27 private int sizeof(Object obj) {
31 public boolean isFinished() {
32 return this.newObjs.isEmpty();
35 public int getTargetCoreNum() {