THPDFParserBudgetStatistics Record

Reports parser budget limits, token totals, peaks, breaches and session validity

Declaration

THPDFParserBudgetStatistics= record
  MaxTokenBytes: Integer;
  MaxTotalTokens: Int64;
  MaxContainerItems: Integer;
  MaxBadTokens: Integer;
  TokenCount: Int64;
  BadTokenCount: Int64;
  PeakTokenBytes: Integer;
  PeakContainerItems: Integer;
  LimitBreachCount: Int64;
  LastLimit: THPDFParserBudgetLimit;
  LastObserved: Int64;
  LastMaximum: Int64;
  Exceeded: boolean;
  Valid: boolean;
end;

Unit

HPDFDoc

Fields

FieldPurpose
MaxTokenBytesConfigured cap on the total token bytes for the session
MaxTotalTokensConfigured cap on the number of tokens that may be scanned
MaxContainerItemsConfigured cap on items inside a single array or dictionary container
MaxBadTokensConfigured cap on malformed tokens that may be tolerated per session
TokenCountTokens consumed so far within the session
BadTokenCountMalformed tokens met with so far
PeakTokenBytesLargest single token byte size seen so far
PeakContainerItemsLargest container item count seen so far
LimitBreachCountNumber of times any budget limit was struck during the session
LastLimitWhich limit kind produced the latest breach (THPDFParserBudgetLimit)
LastObservedObserved value of the latest breach
LastMaximumConfigured maximum of the latest breach
ExceededTrue once any limit has been overstepped and the load was abandoned
ValidTrue whilst a budget-tracked parser session is active; GetLastParserBudgetStatistics hands back this value

Usage notes

Related APIs