public class Usage extends Invocation
Modifier and Type | Field and Description |
---|---|
private int |
m_idrss
integral unshared data size, or private integral resident set size.
|
private int |
m_inblock
block input operations.
|
private int |
m_isrss
integral stoack size.
|
private int |
m_ixrss
integral shared memory size.
|
private int |
m_majflt
major page faults - incurred subsystem IO, sometimes includes swap.
|
private int |
m_maxrss
maximum resident set size.
|
private int |
m_minflt
minor page faults - sometimes also recovered pages.
|
private int |
m_msgrcv
messages received.
|
private int |
m_msgsnd
messages sent.
|
private int |
m_nivcsw
involuntary conext switches.
|
private int |
m_nsignals
number of signals sent to process.
|
private int |
m_nswap
number of swap operations - unused in Linux unless kernel patched.
|
private int |
m_nvcsw
voluntary context switches.
|
private int |
m_outblock
block output operations.
|
private double |
m_stime
system time - time spent in system mode, seconds with fraction.
|
private double |
m_utime
user time - time spent in user mode, seconds with fraction.
|
Constructor and Description |
---|
Usage()
Default c'tor: Construct a hollow shell and allow further
information to be added later.
|
Usage(double utime,
double stime,
int minflt,
int majflt,
int nswap,
int nsignals,
int nvcsw,
int nivcsw,
int maxrss,
int ixrss,
int idrss,
int isrss,
int inblock,
int outblock,
int msgsnd,
int msgrcv)
Full c'tor: All values are provided.
|
Modifier and Type | Method and Description |
---|---|
int |
getInputBlocks()
Accessor.
|
int |
getInvoluntarySwitches()
Accessor: Obtains the involuntary context switches.
|
int |
getMajorFaults()
Accessor: Obtains the major page faults.
|
int |
getMaximumRSS()
Accessor.
|
int |
getMinorFaults()
Accessor: Obtains the minfor page faults.
|
int |
getOutputBlocks()
Accessor.
|
int |
getReceived()
Accessor.
|
int |
getSent()
Accessor.
|
int |
getSharedRSS()
Accessor.
|
int |
getSignals()
Accessor: Obtains the system signals sent.
|
int |
getStackRSS()
Accessor.
|
int |
getSwaps()
Accessor: Obtains number of swap operations.
|
double |
getSystemTime()
Accessor: Obtains the system time from the object.
|
int |
getUnsharedRSS()
Accessor.
|
double |
getUserTime()
Accessor: Obtains the user time from the object.
|
int |
getVoluntarySwitches()
Accessor: Obtains the voluntary context switches.
|
void |
setInputBlocks(int inblock)
Accessor.
|
void |
setInvoluntarySwitches(int nivcsw)
Accessor: Sets the number of involuntary context switches.
|
void |
setMajorFaults(int majflt)
Accessor: Sets the number of major page faults.
|
void |
setMaximumRSS(int maxrss)
Accessor.
|
void |
setMinorFaults(int minflt)
Accessor: Sets the number of minor faults.
|
void |
setOutputBlocks(int outblock)
Accessor.
|
void |
setReceived(int msgrcv)
Accessor.
|
void |
setSent(int msgsnd)
Accessor.
|
void |
setSharedRSS(int ixrss)
Accessor.
|
void |
setSignals(int nsignals)
Accessor: Sets the number of signalss sent.
|
void |
setStackRSS(int isrss)
Accessor.
|
void |
setSwaps(int nswap)
Accessor: Sets the number of swap ops.
|
void |
setSystemTime(double stime)
Accessor: Sets the system time.
|
void |
setUnsharedRSS(int idrss)
Accessor.
|
void |
setUserTime(double utime)
Accessor: Sets the user time.
|
void |
setVoluntarySwitches(int nvcsw)
Accessor: Sets the number of voluntary context switches.
|
void |
toString(Writer stream)
Converts the active state into something meant for human consumption.
|
void |
toXML(Writer stream,
String indent,
String namespace)
Dump the state of the current element as XML output.
|
private double m_utime
private double m_stime
private int m_minflt
private int m_majflt
private int m_nswap
private int m_nsignals
private int m_nvcsw
private int m_nivcsw
private int m_maxrss
private int m_ixrss
private int m_idrss
private int m_isrss
private int m_inblock
private int m_outblock
private int m_msgsnd
private int m_msgrcv
public Usage()
public Usage(double utime, double stime, int minflt, int majflt, int nswap, int nsignals, int nvcsw, int nivcsw, int maxrss, int ixrss, int idrss, int isrss, int inblock, int outblock, int msgsnd, int msgrcv)
utime
- is the time spent in user modestime
- is the time spent in system modeminflt
- are minor page faults and page reclaimsmajflt
- are major page faults and s.t. swapsnswap
- are the number of swap operationsnsignals
- are the number of signals sentnvcsw
- are voluntary context switchesnivcsw
- are involuntary context switchesmaxrss
- is the maximum resident set sizeixrss
- is the integral shared memory sizeidrss
- is the integral unshared data sizeisrss
- is the integral unshared stack sizeinblock
- are block input operationsoutblock
- are block output operationsmsgsnd
- are messages sentmsgrcv
- are messages receivedpublic double getUserTime()
setUserTime(double)
public double getSystemTime()
setSystemTime(double)
public int getMinorFaults()
setMinorFaults(int)
public int getMajorFaults()
setMajorFaults(int)
public int getSwaps()
setSwaps(int)
public int getSignals()
setSignals(int)
public int getVoluntarySwitches()
setVoluntarySwitches(int)
public int getInvoluntarySwitches()
setInvoluntarySwitches(int)
public void setUserTime(double utime)
utime
- is the new user time in seconds with fraction.getUserTime()
public void setSystemTime(double stime)
stime
- is the new user time in seconds with fraction.getSystemTime()
public void setMinorFaults(int minflt)
minflt
- is the new number of minor faults.getMinorFaults()
public void setMajorFaults(int majflt)
majflt
- is the new number of major page faults.getMajorFaults()
public void setSwaps(int nswap)
nswap
- is the new number of swap operations.getSwaps()
public void setSignals(int nsignals)
nsignals
- is the new number of signals.getSignals()
public void setVoluntarySwitches(int nvcsw)
nvcsw
- is the new number voluntary context switches.getVoluntarySwitches()
public void setInvoluntarySwitches(int nivcsw)
nivcsw
- is the new number involuntary context switches.getInvoluntarySwitches()
public int getMaximumRSS()
setMaximumRSS(int)
public void setMaximumRSS(int maxrss)
maxrss
- getMaximumRSS()
public int getSharedRSS()
setSharedRSS(int)
public void setSharedRSS(int ixrss)
ixrss
- getSharedRSS()
public int getUnsharedRSS()
setUnsharedRSS(int)
public void setUnsharedRSS(int idrss)
idrss
- getUnsharedRSS()
public int getStackRSS()
setStackRSS(int)
public void setStackRSS(int isrss)
isrss
- getStackRSS()
public int getInputBlocks()
setInputBlocks(int)
public void setInputBlocks(int inblock)
inblock
- getInputBlocks()
public int getOutputBlocks()
setOutputBlocks(int)
public void setOutputBlocks(int outblock)
outblock
- getOutputBlocks()
public int getSent()
setSent(int)
public void setSent(int msgsnd)
msgsnd
- getSent()
public int getReceived()
setReceived(int)
public void setReceived(int msgrcv)
msgrcv
- getReceived()
public void toString(Writer stream) throws IOException
toString
in class org.griphyn.vdl.Chimera
stream
- is a stream opened and ready for writing. This can also
be a string stream for efficient output.IOException
- if something fishy happens to the stream.public void toXML(Writer stream, String indent, String namespace) throws IOException
toXML
in class org.griphyn.vdl.Chimera
stream
- is a stream opened and ready for writing. This can also
be a string stream for efficient output.indent
- is a String
of spaces used for pretty
printing. The initial amount of spaces should be an empty string.
The parameter is used internally for the recursive traversal.
If a null
value is specified, no indentation nor
linefeeds will be generated.namespace
- is the XML schema namespace prefix. If neither
empty nor null, each element will be prefixed with this prefix,
and the root element will map the XML namespace.IOException
- if something fishy happens to the stream.BufferedWriter
Copyright © 2011 The University of Southern California. All Rights Reserved.