Contains classes and routines used for profiling in the Lazarus debugger.

This file is part of the LazUtils package.

Provides profiler instrumentation for execution times in a logger class.
Constructor for the class instance.

Create sets the default value for the MaxDepth property (100), and initializes the first time value in the execution time profiler. The initial nesting level is also set (0).

Captures the execution start time and nesting level when a new block is entered.
Logger class instance for the block handler.
Current nesting level for the block handler.
Updates the cumulative execution time when a block is exited.
Logger class instance for the block handler.
Nesting level before the block handler is exited.
Maximum depth for execution time data in the nested levels for the block handler.
Calculates the cumulative execution time for the block at the specified nesting level.

TimeDiff is a read-only QWord property which provides indexed access to the cumulative execution time for the block at the specified nesting level. The value represents a number of "ticks" or milliseconds as returned from the GetTickCount64 routine in the RTL.

The property value is calculated as the difference between the current "tick" value and the execution start time from the parent block. A timer overflow condition is handled in the calculation. The property value is 0 (zero) when ALevel is not in the range 0..MaxDepth.

Nesting level for the block execution time calculated in the method.
Execution time data for the block at the specified nesting level.
Nesting level for the calculated execution time.
Provides profiler instrumentation for memory allocation (heap) in a logger class.
Constructor for the class instance.

Create sets the default value for the MaxDepth property (100), and initializes the first values for the memory allocation profiler. The initial nesting level is also set (0).

Captures memory allocation and nesting level when a block is entered.
Logger class instrumented in the profiler tool.
Current nesting level for the block.
Updates the cumulative memory allocation for the parent block when a block is exited.
Logger class for the block handler.
Maximum depth the nested levels in the block handler.
Indicates heap memory allocation for the block at the specified nesting level.

MemDiff is a read-only Int64 property which provides indexed access to the cumulative memory usage for a block at a specified nesting level. The value is calculated as the difference between the current memory allocation in the block and the initial memory allocation in the parent block. The property value reflects heap memory allocation.

The property value is 0 (zero) if ALevel is not in the range 0..MaxDepth.

Nesting level for the block reflected in the property value.
Memory allocation data for the block at the specified nesting level.
Nesting level for the block reflected in the property value.
Generates a formatted message with memory usage for the parent, current, or child block(s).
Generates a formatted message with execution times for the parent, current, or child blocks.
Gets or creates timing data for the specified name, and updates its last execution time.
Name for the timing data retrieved or created in the routine.
Updates timing data using the specified name when it is stopped, and calculates its cumulative execution time.
Name for the timing data updated in the routine.
Gets or creates memory allocation data for the specified name, and initializes its data.
Name for the memory allocation data updated in the routine.
Updates memory allocation data using the specified name when it is stopped, and calculates its cumulative usage.
Name for the associated memory allocation data updated in the routine.