42 #ifndef _DWMRUSAGE_HH_ 43 #define _DWMRUSAGE_HH_ 46 #include <sys/types.h> 48 #include <sys/resource.h> 78 Rusage(
const struct rusage & rusage);
141 int32_t
Swaps()
const;
190 std::istream &
Read(std::istream & is);
195 std::ostream &
Write(std::ostream & os)
const;
201 int Read(gzFile gzf);
207 int Write(gzFile gzf)
const;
213 ssize_t
Read(
int fd);
219 ssize_t
Write(
int fd)
const;
224 size_t Read(FILE * f);
229 size_t Write(FILE *f)
const;
245 int64_t _maxResidentSetSize;
246 int64_t _integralSharedTextMemorySize;
247 int64_t _integralUnsharedDataSize;
248 int64_t _integralUnsharedStackSize;
249 int32_t _pageReclaims;
252 int32_t _blockInputOperations;
253 int32_t _blockOutputOperations;
254 int32_t _messagesSent;
255 int32_t _messagesReceived;
256 int32_t _signalsReceived;
257 int32_t _voluntaryContextSwitches;
258 int32_t _involuntaryContextSwitches;
260 void Set(
const struct rusage & rusage);
265 #endif // _DWMRUSAGE_HH_ int64_t IntegralUnsharedDataSize() const
An integral value of the amount of unshared memory residing in the data segment of a process (express...
int32_t VoluntaryContextSwitches() const
The number of times a context switch resulted due to a process voluntarily giving up the processor be...
This class is a pure virtual class, defining an interface for classes that can write their contents t...
Definition: DwmGZWritable.hh:57
This class encapsulates a time value beyond the UNIX epoch, with microsecond granularity.
Definition: DwmTimeValue.hh:72
Dwm::Writable pure virtual class definition.
const TimeValue & SystemTime() const
The total amount of time spent in the system executing on behalf of the process(es).
std::ostream & Write(std::ostream &os) const
Writes to an ostream. Returns the ostream.
Dwm::GZReadable pure virtual class definition.
Dwm::Readable pure virtual class definition.
This class encapsulates struct rusage and getrusage() functionality.
Definition: DwmRusage.hh:65
int64_t IntegralUnsharedStackSize() const
An integral value of the amount of unshared memory residing in the stack segment of a process (expres...
int32_t SignalsReceived() const
The number of signals delivered.
int64_t IntegralSharedTextMemorySize() const
An integral value indicating the amount of memory used by the text segment that was also shared among...
int32_t PageFaults() const
The number of page faults serviced that required I/O activity.
std::istream & Read(std::istream &is)
Reads from an istream. Returns the istream.
Dwm::TimeValue class definition.
int32_t Swaps() const
The number of times a process was ``swapped'' out of main memory.
Definition: DwmBZ2IO.hh:67
int32_t InvoluntaryContextSwitches() const
The number of times a context switch resulted due to a higher priority process becoming runnable or b...
uint32_t StreamedLength() const
Returns the number of bytes that would be written if we called one of the Write() members...
int32_t PageReclaims() const
The number of page faults serviced without any I/O activity; here I/O activity is avoided by reclaimi...
int32_t BlockOutputOperations() const
The number of times the file system had to perform output.
This class is a pure virtual class, defining an interface for classes that can read their contents fr...
Definition: DwmGZReadable.hh:57
int32_t MessagesSent() const
The number of IPC messages sent.
int32_t BlockInputOperations() const
The number of times the file system had to perform input.
bool operator==(const Rusage &rusage) const
operator ==
This class defines an interface for classes that can write their contents to an ostream, file descriptor or FILE pointer.
Definition: DwmWritable.hh:58
Dwm::GZWritable pure virtual class definition.
friend std::ostream & operator<<(std::ostream &os, const Rusage &r)
Prints to an ostream.
This class defines an interface for classes that can read their contents from an istream, file descriptor or FILE pointer.
Definition: DwmReadable.hh:58
int32_t MessagesReceived() const
The number of IPC messages received.
bool Get(int who)
Get the current process' rusage.
int64_t MaxResidentSetSize() const
The maximum resident set size utilized (in bytes).
const TimeValue & UserTime() const
The total amount of time spent executing in user mode.