Calculates a node summary of all nodes that match the specified search criteria. Possible search parameters include: URL, content-type of the response, document load-type (load, cache-hit, suppressed), document kind (html or embedded), and the location within a redirection chain (a redirection chain is created when a request is retried or reissued because of a redirection or an authentication request by the server).
The return value is the number of nodes that have been used for the calculation of the summary node.
To generally enable extended page statistics functionality, call WebSetOption with an option of WEB_OPT_DETAILED_PAGE_STAT (for a detailed description of the various values see WebSetOption).
WebAPI.bdh
WebPageStatCalcSummaryNode( in sUrlFilter : string optional, in sContentTypeFilter : string optional, in nMatch : number optional, in nFlags : number optional ): number;
The number of nodes that have been used for the calculation of the summary node.
Parameter | Description |
---|---|
sUrlFilter | String to which the actual URL is to be compared. The nMatch parameter specifies the comparison method. When this parameter is omitted (null or “”), no URL comparison is performed. |
sContentTypeFilter | String to which the actual content-type (server response) is to be compared. The nMatch parameter specifies the comparison method. When this parameter is omitted (null or “”) no content-type comparison is performed. |
nMatch |
Specify one of the following values (optional):
|
nFlags |
Specifies the various options used by the search for the nodes. When this parameter is omitted the default options specified by the call to WebSetOption(WEB_OPT_DETAILED_PAGE_STAT) are used. Otherwise specify one of the following values:
|
dcltrans transaction TInit begin WebSetOption(WEB_OPT_DETAILED_PAGE_STAT, PAGE_STAT_FLAG_AllLoadedDocs); end TInit; transaction TWeb var nNodes : number; fValue : float; begin WebPageURL("http://lab3/"); nNodes := WebPageStatCalcSummaryNode(null, "image/*", PAGE_STAT_MATCH_WildcardNoCase); if nNodes > 0 then WebPageStatGetNodeData(STATFLAG_BytesSent, fValue, PAGE_STAT_Calculated); print("Bytes sent for images: " + string(fValue)); end; end TWeb;