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 Plus Error Codes” in the c-tree Plus Programmer’s Reference Guide for a complete listing of valid c-tree Plus error values. Example ULONG ct[8] /* array of 8 longs for performance value */
printf("\ndata buffer requests = %ld",ct[DataBufferRequests]);
printf("\ndata buffer hits = %ld",ct[DataBufferHits]);
printf("\nindex buffer requests = %ld",
ct[IndexBufferRequests]); 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() |
|||