Skip to content

Commit

Permalink
Update VM.java
Browse files Browse the repository at this point in the history
  • Loading branch information
kanemih committed Dec 22, 2020
1 parent 1a5ce0a commit ff0aeff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/net/gripps/cloud/core/VM.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ public VM(String ID, String in_hostID, HashMap<String, VCPU> vCPUMap, long ra
this.ipAddr = null;

}

public long getMIPS(){
if(this.getvCPUMap().isEmpty()){
return -1;
}else{
Iterator<VCPU> vIte = this.getvCPUMap().values().iterator();
VCPU vcpu = vIte.next();
return vcpu.getMips();
}
}

public String getIpAddr() {
return ipAddr;
Expand Down

0 comments on commit ff0aeff

Please sign in to comment.