item_statistics Class Reference

This is the set of timing information collected for a scheduled item. More...

#include <item_statistics.h>

Collaboration diagram for item_statistics:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 item_statistics (int durations_kept=14)
 sets up the statistics package.
istring text_form () const
 returns a string with a text representation of our information.
istring adjusted_representation (const guarded_value< time_stamp > &to_show) const
 prints out the time_stamp's value or "invalid" if it has no value yet.

Public Attributes

guarded_value< time_stampentry
 when the item was preprocessed for entry.
guarded_value< time_stampexit
 when the item left the schedule.
guarded_value< int > last_outcome
 what happened when we last scheduled.
int_averager durations
 record of activation times.

Detailed Description

This is the set of timing information collected for a scheduled item.

Note that this header is intended for use in CPP files and the class should be forward declared within other headers.

Definition at line 30 of file item_statistics.h.


Constructor & Destructor Documentation

item_statistics::item_statistics ( int  durations_kept = 14  )  [inline]

sets up the statistics package.

creates our averager and sets the timers to invalid values. the proper type for "last_outcome" is unknown, so we leave it uninitialized too.

Definition at line 38 of file item_statistics.h.


Member Function Documentation

istring item_statistics::text_form (  )  const

returns a string with a text representation of our information.

Definition at line 24 of file item_statistics.cpp.

References adjusted_representation(), averager< contents >::average(), durations, entry, exit, averager< contents >::samples(), and istring::SPRINTF.

Referenced by schedulable::schedulable_text_form().

istring item_statistics::adjusted_representation ( const guarded_value< time_stamp > &  to_show  )  const

prints out the time_stamp's value or "invalid" if it has no value yet.

Definition at line 37 of file item_statistics.cpp.

References guarded_value< contents >::initialized().

Referenced by text_form().


Member Data Documentation

guarded_value<time_stamp> item_statistics::entry

when the item was preprocessed for entry.

Definition at line 33 of file item_statistics.h.

Referenced by text_form().

guarded_value<time_stamp> item_statistics::exit

when the item left the schedule.

Definition at line 34 of file item_statistics.h.

Referenced by text_form().

guarded_value<int> item_statistics::last_outcome

what happened when we last scheduled.

Definition at line 35 of file item_statistics.h.

Referenced by scheduler::add().

int_averager item_statistics::durations

record of activation times.

Definition at line 36 of file item_statistics.h.

Referenced by text_form().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:30:50 2008 for HOOPLE Libraries by  doxygen 1.5.1