Documentation Center

  • Trials
  • Product Updates

H5F.get_mdc_hit_rate

Metadata cache hit-rate

Syntax

hitRate = H5F.get_mdc_hit_rate(file_id)

Description

hitRate = H5F.get_mdc_hit_rate(file_id) queries the metadata cache of the target file to obtain its hit-rate since the last time hit-rate statistics were reset. If the cache has not been accessed since the last time the hit-rate statistics were reset, the hit-rate is defined to be 0.0. The hit-rate is calculated as

(cache hits / (cache hits + cache misses))

Examples

fid = H5F.open('example.h5');
hit_rate = H5F.get_mdc_hit_rate(fid);
H5F.close(fid);

See Also

Was this topic helpful?