Beispiel #1
0
 //支持不同维度资源相加 1470 + 98
 public Resource Add(Resource r)
 {
     Cpu.Add(r.Cpu);
     Mem.Add(r.Mem);
     Disk += r.Disk;
     P    += r.P;
     M    += r.M;
     Pm   += r.Pm;
     return(this);
 }
Beispiel #2
0
 public Resource Add(JobBatch batch)
 {
     Cpu.Add(batch.Cpu * batch.Size, batch.BeginTime, batch.Duration);
     Mem.Add(batch.Mem * batch.Size, batch.BeginTime, batch.Duration);
     return(this);
 }