DeltaResource.mesa
Copyright Ó 1990, 1992 by Xerox Corporation. All rights reserved.
Russ Atkinson (RRA) May 31, 1990 7:52 pm PDT
DeltaResource: CEDAR DEFINITIONS
= BEGIN
The TimeVal (timeval) type is described in /usr/include/sys/time.h
TimeVal: TYPE = RECORD [secs, micros: INT];
The RUsage (rusage) type is described in /usr/include/sys/resource.h
RUsage: TYPE = RECORD [
utime: TimeVal ¬ [0, 0], -- user time
stime: TimeVal ¬ [0, 0], -- system time
maxrss: INT ¬ 0, -- max resident set size
ixrss: INT ¬ 0, -- "integral" of shared memory usage
idrss: INT ¬ 0, -- "integral" of unshared memory usage
isrss: INT ¬ 0, -- "integral" of unshared stack memory usage
minflt: INT ¬ 0, -- # of cheap page faults
majflt: INT ¬ 0, -- # of expensive page faults
nswap: INT ¬ 0, -- # of swaps
inblock: INT ¬ 0, -- # of times blocked on input
outblock: INT ¬ 0, -- # of times blocked on output
msgsnd: INT ¬ 0, -- # of messages sent on sockets
msgrcv: INT ¬ 0, -- # of messages received on sockets
nsignals: INT ¬ 0, -- # of signals
nvcsw: INT ¬ 0, -- # of voluntary switches
nivcsw: INT ¬ 0]; -- # of involuntary switches
Stats: TYPE = RECORD [
elapsed: REAL ¬ 0.0,
utime: REAL ¬ 0.0,
stime: REAL ¬ 0.0,
bytesAllocated: INT ¬ 0,
rusage: RUsage ¬ []];
TakeDelta: PROC [inner: PROC] RETURNS [Stats];
Calculates differences in key statistics during the execution of inner[].
GetRUsage: PROC RETURNS [RUsage];
Samples key system statistics using XR←GetRUsage.
END.