ham_statistics_t Struct Reference

#include <hamsterdb_stats.h>

Data Fields

ham_size_t freelist_record_count
ham_size_t freelist_stats_maxalloc
ham_freelist_page_statistics_tfreelist_stats
ham_runtime_statistics_dbdata_t db_stats
ham_runtime_statistics_globdata_t global_stats
unsigned dont_collect_freelist_stats: 1
unsigned dont_collect_db_stats: 1
unsigned dont_collect_global_stats: 1
ham_free_statistics_func_t_free_func
void * _free_func_internal_arg

Detailed Description

This structure is a READ-ONLY data structure returned through invoking ham_env_get_parameters or ham_get_parameters with a HAM_PARAM_GET_STATISTICS ham_parameter_t entry.

Warning:
The content of this structure will be subject to change with each hamsterdb release; having it available in the public interface does not mean one can assume the data layout and/or content of the ham_statistics_t structure to remain constant over multiple release version updates of hamsterdb.

Also note that the data is exported to aid very advanced uses of hamsterdb only and is to be accessed in an exclusively read-only fashion.

The structure includes a function pointer which will optionally be set by hamsterdb upon invoking ham_env_get_parameters or ham_get_parameters and this function should be invoked by the caller to release all memory allocated by hamsterdb in the ham_statistics_t structure, and this action MUST be performed before the related env and/or db handles are either closed or deleted, whichever of these comes first in your application run-time flow.

The easiest way to invoke this ham_clean_statistics_datarec function (when it is set) is to use the provided ham_clean_statistics_datarec() function.

See also:
HAM_PARAM_GET_STATISTICS
ham_clean_statistics_datarec
ham_get_parameters
ham_env_get_parameters

Definition at line 454 of file hamsterdb_stats.h.


Field Documentation

A reference to a hamsterdb-specified optional data cleanup function.

Warning:
The user MUST call this cleanup function when it is set by hamsterdb, preferrably through invoking ham_clean_statistics_datarec() as that function will check if this callback has been set or not before invoking it.
See also:
ham_clean_statistics_datarec

Definition at line 502 of file hamsterdb_stats.h.

Definition at line 508 of file hamsterdb_stats.h.

The ham_db_t specific statistics

Definition at line 466 of file hamsterdb_stats.h.

[input] Whether the ham_db_t specific statistics should be gathered [output] will be reset when the db specific statistics have been gathered

Definition at line 482 of file hamsterdb_stats.h.

[input] Whether the freelist statistics should be gathered (this is a relatively costly operation) [output] will be reset when the freelist statistics have been gathered

Definition at line 476 of file hamsterdb_stats.h.

[input] Whether the ham_env_t statistics (a.k.a. 'global statistics') should be gathered [output] will be reset when the global statistics have been gathered

Definition at line 489 of file hamsterdb_stats.h.

Number of freelist pages (and statistics records) known to hamsterdb

Definition at line 457 of file hamsterdb_stats.h.

The freelist_stats_maxalloc freelist statistics records

Definition at line 463 of file hamsterdb_stats.h.

Number of freelist statistics records allocated in this structure

Definition at line 460 of file hamsterdb_stats.h.

The ham_env_t statistics, a.k.a. 'global statistics'

Definition at line 469 of file hamsterdb_stats.h.


The documentation for this struct was generated from the following file:
Generated by  doxygen 1.6.3