#include <Timeprobe_T.h>
Inheritance diagram for ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >:
Public Types | |
typedef ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR > | SELF |
Self. | |
typedef ACE_Timeprobe_Ex< ACE_LOCK, ACE_Allocator > | ACE_Timeprobe |
typedef ACE_Unbounded_Set< ACE_Event_Descriptions > | EVENT_DESCRIPTIONS |
We can hold multiple event description tables. | |
Public Member Functions | |
ACE_Timeprobe_Ex (u_long size=ACE_DEFAULT_TIMEPROBE_TABLE_SIZE) | |
Create Timeprobes with size slots. | |
ACE_Timeprobe_Ex (ALLOCATOR *allocator, u_long size=ACE_DEFAULT_TIMEPROBE_TABLE_SIZE) | |
Create Timeprobes with size slots. | |
~ACE_Timeprobe_Ex (void) | |
Destructor. | |
void | timeprobe (u_long event) |
Record a time. event is used to describe this time probe. | |
void | timeprobe (const char *id) |
Record a time. id is used to describe this time probe. | |
int | event_descriptions (const char **descriptions, u_long minimum_id) |
Record event descriptions. | |
void | print_times (void) |
Print the time probes. | |
void | print_absolute_times (void) |
Print the time probes. | |
void | reset (void) |
Reset the slots. All old time probes will be lost. | |
void | increase_size (u_long size) |
ACE_Timeprobe_Ex (const ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR > &) | |
Not implemented (stupid MSVC won't let it be protected). | |
ACE_Unbounded_Set< ACE_Event_Descriptions > & | event_descriptions (void) |
Event Descriptions. | |
ACE_Unbounded_Set< ACE_Event_Descriptions > & | sorted_event_descriptions (void) |
Sorted Event Descriptions. | |
const char * | find_description_i (u_long i) |
Find description of event <i>. | |
void | sort_event_descriptions_i (void) |
Sort event descriptions. | |
ACE_timeprobe_t * | timeprobes (void) |
Time probe slots. | |
ACE_LOCK & | lock (void) |
Synchronization variable. | |
u_long | max_size (void) |
Max size of timestamp table. | |
u_long | current_size (void) |
Current size of timestamp table. | |
Protected Member Functions | |
ALLOCATOR * | allocator (void) |
Protected Attributes | |
EVENT_DESCRIPTIONS | event_descriptions_ |
Event Descriptions. | |
EVENT_DESCRIPTIONS | sorted_event_descriptions_ |
Sorted Event Descriptions. | |
ACE_timeprobe_t * | timeprobes_ |
Time probe slots. | |
ACE_LOCK | lock_ |
Synchronization variable. | |
u_long | max_size_ |
Max size of timestamp table. | |
u_long | current_size_ |
Current size of timestamp table. | |
u_short | report_buffer_full_ |
Private Attributes | |
ALLOCATOR * | allocator_ |
This class provides a lightweight implementation for measuring the time required to execute code between two time probes. When a time probe executes, it records the time, the id of the calling thread, and an event description. The event description can either be an unsigned long or a string (char *). If string are used, care must be taken cause only pointer copies are done and the string data is *not* copied. The recorded time probes can then be printed by calling <print_times>. If you have used unsigned longs as event descriptions in any of your time probes, you must have provided an event description table that maps the unsigned longs to readable strings. This map is a simple array of strings, and the event number is used as the index into the array when looking for the event description. If you have only used strings for the event description, this map is not necessary. Multiple maps can also be used to chunk up the time probes. Each one can be added by calling <event_descriptions>. Different tables are used internally by consulting the minimum_id for each table. It is up to the user to make sure that multiple tables do not share the same event id range.
|
ACE_Timeprobe |
|
We can hold multiple event description tables.
|
|
Self.
|
|
Create Timeprobes with size slots.
|
|
Create Timeprobes with size slots.
|
|
Destructor.
|
|
Not implemented (stupid MSVC won't let it be protected).
|
|
Obtain an allocator pointer. If there is no allocator stored in the instance, the singleton allocator in the current process is used. |
|
Current size of timestamp table.
|
|
Event Descriptions.
|
|
Record event descriptions.
|
|
Find description of event <i>.
|
|
|
|
Synchronization variable.
|
|
Max size of timestamp table.
|
|
Print the time probes.
|
|
Print the time probes.
|
|
Reset the slots. All old time probes will be lost.
|
|
Sort event descriptions.
|
|
Sorted Event Descriptions.
|
|
Record a time. id is used to describe this time probe.
|
|
Record a time. event is used to describe this time probe.
|
|
Time probe slots.
|
|
|
|
Current size of timestamp table.
|
|
Event Descriptions.
|
|
Synchronization variable.
|
|
Max size of timestamp table.
|
|
Flag indicating the report buffer has filled up, and is now acting as a ring-buffer using modulus arithmetic: this saves the max_size_ most recent time stamps and loses earlier ones until drained. |
|
Sorted Event Descriptions.
|
|
Time probe slots.
|