Class

Tms

Extends:

A data object, representing the times associated with a benchmark measurement.

Constants
CAPTION
FMTSTR
Public Attributes
cstime System CPU time of children
cutime User CPU time of children
label Label
real Elapsed real time
stime System CPU time
total Total time, that is utime + stime + cutime + cstime
utime User CPU time
Public Methods
* Returns a new Tms object obtained by memberwise multiplication of the individual times for this Tms object by x.
+ Returns a new Tms object obtained by memberwise summation of the individual times for this Tms object with those of the other Tms object. This method and #/() are useful for taking statistics.
- Returns a new Tms object obtained by memberwise subtraction of the individual times for the other Tms object from those of this Tms object.
/ Returns a new Tms object obtained by memberwise division of the individual times for this Tms object by x. This method and #+() are useful for taking statistics.
add Returns a new Tms object whose times are the sum of the times for this Tms object, plus the time required to execute the code block (blk).
add! An in-place version of #add.
format Returns the contents of this Tms object as a formatted string, according to a format string like that passed to Kernel.format. In addition, #format accepts the following extensions:
new Returns an initialized Tms object which has u as the user CPU time, s as the system CPU time, cu as the children’s user CPU time, cs as the children’s system CPU time, real as the elapsed real time and l as the label.
to_a Returns a new 6-element array, consisting of the label, user CPU time, system CPU time, children’s user CPU time, children’s system CPU time and elapsed real time.
to_s Same as #format.
Protected Methods
memberwise
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.