THPDFMappedFileStatistics Record
Reports configuration, geometry, mapping, cache and transfer telemetry gathered by the memory-mapped file source during a load
Declaration
THPDFMappedFileStatistics= record
FileSize: Int64;
ConfiguredWindowSize: Int64;
ConfiguredCacheWindowCount: Integer;
WindowSize: Int64;
CacheWindowCount: Integer;
MappedByteLimit: Int64;
CurrentMappedBytes: Int64;
PeakMappedBytes: Int64;
GeometryChangeCount: Int64;
SequentialReadCalls: Int64;
RandomReadCalls: Int64;
AdaptiveGeometry: Boolean;
SequentialGeometryActive: Boolean;
RandomGeometryActive: Boolean;
ReadCalls: Int64;
BytesRead: Int64;
MapCount: Int64;
CacheHits: Int64;
FallbackReadCalls: Int64;
FallbackBytes: Int64;
DirectTransferCalls: Int64;
DirectTransferBytes: Int64;
end;
Unit
HPDFObjs
Fields
| Field | Purpose |
|---|---|
FileSize | Size of the mapped source file, in bytes |
ConfiguredWindowSize | Window size as configured via LocalFileMappingWindowSize |
ConfiguredCacheWindowCount | Resident window count as configured via LocalFileMappingCacheWindows |
WindowSize | Window size that is actually in effect for this source |
CacheWindowCount | Number of windows held at present by the window cache |
MappedByteLimit | Upper bound on the bytes the source keeps mapped at any one time |
CurrentMappedBytes | Bytes mapped at present |
PeakMappedBytes | High-water mark of mapped bytes across the load |
GeometryChangeCount | Number of times the adaptive geometry switched the window layout |
SequentialReadCalls | Read requests classed as sequential |
RandomReadCalls | Read requests classed as random access |
AdaptiveGeometry | True when adaptive geometry selection has been enabled for the source |
SequentialGeometryActive | True whilst the sequential window geometry is active |
RandomGeometryActive | True whilst the random-access window geometry is active |
ReadCalls | Total read requests served through the mapped source |
BytesRead | Total bytes handed over by those reads |
MapCount | Number of times a file view was mapped into a window |
CacheHits | Reads satisfied by a window that was already resident |
FallbackReadCalls | Reads that dropped back to plain file reads outside the window cache |
FallbackBytes | Bytes delivered by fallback reads |
DirectTransferCalls | Direct stream-to-stream transfers that sidestep the window cache |
DirectTransferBytes | Bytes moved by direct transfers |
Usage notes
- Read the record with
THotPDF.GetLastMappedFileStatistics, which returns True only when the last load really used memory mapping - Tune the geometry with
LocalFileMappingWindowSize,LocalFileMappingCacheWindowsandLocalFileMappingAdaptiveGeometrybefore loading SequentialGeometryActiveandRandomGeometryActiveare mutually exclusive snapshots of the mode in force