|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnachos.Statistics
public class Statistics
This class defines the statistics that are to be kept about Nachos behavior -- how much time (ticks) elapsed, how many user instructions executed, etc. The fields in this class are public to make it easier to update.
Field Summary | |
---|---|
int |
idleTicks
Time spent idle (no threads to run). |
static int |
NetworkTime
Time to send or receive one packet on the network. |
int |
numConsoleCharsRead
Number of chars read from the keyboard. |
int |
numConsoleCharsWritten
Number of chars written to the display. |
int |
numDiskReads
Number of disk read requests. |
int |
numDiskWrites
Number of disk write requests. |
int |
numPacketsRecvd
Number of packets received over the network. |
int |
numPacketsSent
Number of packets sent over the network. |
int |
numPageFaults
Number of virtual memory page faults. |
int |
systemTicks
Time spent executing system code. |
int |
totalTicks
Total time running Nachos. |
int |
userTicks
Time spent executing user code (this is also equal to # of user instructions executed). |
Constructor Summary | |
---|---|
Statistics()
Initialize performance metrics to zero, at system startup. |
Method Summary | |
---|---|
void |
print()
Print performance metrics, when we've finished everything at system shutdown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NetworkTime
public int totalTicks
public int idleTicks
public int systemTicks
public int userTicks
public int numDiskReads
public int numDiskWrites
public int numConsoleCharsRead
public int numConsoleCharsWritten
public int numPageFaults
public int numPacketsSent
public int numPacketsRecvd
Constructor Detail |
---|
public Statistics()
Method Detail |
---|
public void print()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |