IOPERFORMANCE
Monitor Input/Output of data/index caching and count Low-Level file reads and writes.
Short Name
IOPERFORMANCE()
Type
Low-Level function
Declaration
LONG IOPERFORMANCE(pVOID bufptr)
Description
IOPERFORMANCE() monitors the data and index cache as well as the Low-Level file reads and writes. On return, bufptr points to a structure of 8 unsigned long values, defined as follows:
ULONG ct_dbrqs; /* data buffer requests */
ULONG ct_dbhit; /* data buffer hits */
ULONG ct_ibrqs; /* index buffer requests */
ULONG ct_ibhit; /* index buffer hits */
ULONG ct_rdops; /* number of read operations */
ULONG ct_rdbyt; /* bytes read */
ULONG ct_wrops; /* number of write operations */
ULONG ct_wrbyt; /* bytes written */
Note the element defines used in the example below.
Return
IOPERFORMANCE() always returns a 0 (zero) value indicating NO_ERROR. See c-tree Error Codes in the c-tree Programmer’s Reference Guide for a complete listing of valid c-tree error values.
Example
ULONG ct[8] /* array of 8 longs for performance value */
IOPERFORMANCE(ct)
printf("\n\n=================================================");
printf("\ndata buffer requests = %ld",ct[DataBufferRequests]);
printf("\ndata buffer hits = %ld",ct[DataBufferHits]);
printf("\nindex buffer requests = %ld",
ct[IndexBufferRequests]);
printf("\nindex buffer hits = %ld",ct[IndexBufferHits]);
printf("\n# of read operations = %ld",ct[NbrReadOperations]);
printf("\nbytes read = %ld",ct[NbrBytesRead]);
printf("\n# of write operations = %ld",ct[NbrWriteOperations]);
printf("\nbytes written = %ld",ct[NbrBytesWritten]);
printf("\n===================================================");
See also
IOPERFORMANCEX()