#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.
typedef ACE_Timeprobe_Ex<ACE_LOCK, ACE_Allocator> ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::ACE_Timeprobe |
ACE_Timeprobe
typedef ACE_Unbounded_Set<ACE_Event_Descriptions> ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::EVENT_DESCRIPTIONS |
We can hold multiple event description tables.
typedef ACE_Timeprobe_Ex<ACE_LOCK, ALLOCATOR> ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::SELF |
Self.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::ACE_Timeprobe_Ex | ( | u_long | size = ACE_DEFAULT_TIMEPROBE_TABLE_SIZE |
) |
Create Timeprobes with size slots.
ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::ACE_Timeprobe_Ex | ( | ALLOCATOR * | allocator, | |
u_long | size = ACE_DEFAULT_TIMEPROBE_TABLE_SIZE | |||
) |
Create Timeprobes with size slots.
ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::~ACE_Timeprobe_Ex | ( | void | ) |
Destructor.
ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::ACE_Timeprobe_Ex | ( | const ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR > & | ) |
Not implemented (stupid MSVC won't let it be protected).
ALLOCATOR * ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::allocator | ( | void | ) | [protected] |
Obtain an allocator pointer. If there is no allocator stored in the instance, the singleton allocator in the current process is used.
u_long ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::current_size | ( | void | ) |
Current size of timestamp table.
ACE_Unbounded_Set< ACE_Event_Descriptions > & ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::event_descriptions | ( | void | ) |
Event Descriptions.
int ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::event_descriptions | ( | const char ** | descriptions, | |
u_long | minimum_id | |||
) |
Record event descriptions.
const char * ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::find_description_i | ( | u_long | i | ) |
Find description of event <i>.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::increase_size | ( | u_long | size | ) |
ACE_LOCK & ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::lock | ( | void | ) |
Synchronization variable.
u_long ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::max_size | ( | void | ) |
Max size of timestamp table.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::print_absolute_times | ( | void | ) |
Print the time probes.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::print_times | ( | void | ) |
Print the time probes.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::reset | ( | void | ) |
Reset the slots. All old time probes will be lost.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::sort_event_descriptions_i | ( | void | ) |
Sort event descriptions.
ACE_Unbounded_Set< ACE_Event_Descriptions > & ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::sorted_event_descriptions | ( | void | ) |
Sorted Event Descriptions.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::timeprobe | ( | const char * | id | ) |
Record a time. id is used to describe this time probe.
void ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::timeprobe | ( | u_long | event | ) |
Record a time. event is used to describe this time probe.
ACE_timeprobe_t * ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::timeprobes | ( | void | ) |
Time probe slots.
ALLOCATOR* ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::allocator_ [private] |
u_long ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::current_size_ [protected] |
Current size of timestamp table.
EVENT_DESCRIPTIONS ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::event_descriptions_ [protected] |
Event Descriptions.
ACE_LOCK ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::lock_ [protected] |
Synchronization variable.
u_long ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::max_size_ [protected] |
Max size of timestamp table.
u_short ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::report_buffer_full_ [protected] |
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.
EVENT_DESCRIPTIONS ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::sorted_event_descriptions_ [protected] |
Sorted Event Descriptions.
ACE_timeprobe_t* ACE_Timeprobe_Ex< ACE_LOCK, ALLOCATOR >::timeprobes_ [protected] |
Time probe slots.