Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5F_GET_MDC_HIT_RATE

Obtains target file's metadata cache hit rate

Procedure:

H5F_GET_MDC_HIT_RATE(file_id, hit_rate_ptr)

Signature:

herr_t H5Fget_mdc_hit_rate(hid_t file_id, double *hit_rate_ptr)

Parameters:
hid_t file_idIN: Identifier of the target file
double * hit_rate_ptr    OUT: Pointer to the double in which the hit rate is returned. Note that *hit_rate_ptr is undefined if the API call fails

Description:

H5F_GET_MDC_HIT_RATE queries the metadata cache of the target file to obtain its hit rate (cache hits / (cache hits + cache misses)) since the last time hit rate statistics were reset. If the cache has not been accessed since the last time the hit rate stats were reset, the hit rate is defined to be 0.0.

The hit rate stats can be reset either manually (via H5F_RESET_MDC_HIT_RATE_STATS), or automatically. If the cache's adaptive resize code is enabled, the hit rate stats will be reset once per epoch. If they are reset manually as well, the cache may behave oddly.

See the overview of the metadata cache in the special topics section of the user manual for details on the metadata cache and its adaptive resize algorithms.

Returns:

Returns a non-negative value if successful; otherwise returns a negative value.

Example:

Coming soon!

--- Last Modified: December 20, 2018 | 12:21 PM