nachos
Class Statistics

java.lang.Object
  extended by nachos.Statistics

public class Statistics
extends java.lang.Object

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

NetworkTime

public static final int NetworkTime
Time to send or receive one packet on the network.

See Also:
Constant Field Values

totalTicks

public int totalTicks
Total time running Nachos.


idleTicks

public int idleTicks
Time spent idle (no threads to run).


systemTicks

public int systemTicks
Time spent executing system code.


userTicks

public int userTicks
Time spent executing user code (this is also equal to # of user instructions executed).


numDiskReads

public int numDiskReads
Number of disk read requests.


numDiskWrites

public int numDiskWrites
Number of disk write requests.


numConsoleCharsRead

public int numConsoleCharsRead
Number of chars read from the keyboard.


numConsoleCharsWritten

public int numConsoleCharsWritten
Number of chars written to the display.


numPageFaults

public int numPageFaults
Number of virtual memory page faults.


numPacketsSent

public int numPacketsSent
Number of packets sent over the network.


numPacketsRecvd

public int numPacketsRecvd
Number of packets received over the network.

Constructor Detail

Statistics

public Statistics()
Initialize performance metrics to zero, at system startup.

Method Detail

print

public void print()
Print performance metrics, when we've finished everything at system shutdown.