hamsterdb Embedded Database
2.1.7
Main Page
Modules
Namespaces
Data Structures
Files
File List
Globals
include
ham
hamsterdb_int.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2005-2014 Christoph Rupp (chris@crupp.de).
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
28
#ifndef HAM_HAMSTERDB_INT_H__
29
#define HAM_HAMSTERDB_INT_H__
30
31
#include <
ham/hamsterdb.h
>
32
33
#ifdef __cplusplus
34
extern
"C"
{
35
#endif
36
43
#define ham_key_get_intflags(key) (key)->_flags
44
52
#define ham_key_set_intflags(key, f) (key)->_flags=(f)
53
72
HAM_EXPORT
ham_status_t
HAM_CALLCONV
73
ham_db_check_integrity
(
ham_db_t
*db,
ham_u32_t
flags);
74
76
#define HAM_PRINT_GRAPH 1
77
89
HAM_EXPORT
void
HAM_CALLCONV
90
ham_set_context_data
(
ham_db_t
*db,
void
*data);
91
105
HAM_EXPORT
void
*
HAM_CALLCONV
106
ham_get_context_data
(
ham_db_t
*db,
ham_bool_t
dont_lock);
107
115
HAM_EXPORT
ham_db_t
*
HAM_CALLCONV
116
ham_cursor_get_database
(
ham_cursor_t
*cursor);
117
130
#define HAM_METRICS_VERSION 7
131
132
typedef
struct
ham_env_metrics_t
{
133
// the version indicator - must be HAM_METRICS_VERSION
134
ham_u16_t
version
;
135
136
// number of total allocations for the whole lifetime of the process
137
ham_u64_t
mem_total_allocations
;
138
139
// currently active allocations for the whole process
140
ham_u64_t
mem_current_allocations
;
141
142
// current amount of memory allocated and tracked by the process
143
// (excludes memory used by the kernel or not allocated with
144
// malloc/free)
145
ham_u64_t
mem_current_usage
;
146
147
// peak usage of memory (for the whole process)
148
ham_u64_t
mem_peak_usage
;
149
150
// the heap size of this process
151
ham_u64_t
mem_heap_size
;
152
153
// amount of pages fetched from disk
154
ham_u64_t
page_count_fetched
;
155
156
// amount of pages written to disk
157
ham_u64_t
page_count_flushed
;
158
159
// number of index pages in this Environment
160
ham_u64_t
page_count_type_index
;
161
162
// number of blob pages in this Environment
163
ham_u64_t
page_count_type_blob
;
164
165
// number of page-manager pages in this Environment
166
ham_u64_t
page_count_type_page_manager
;
167
168
// number of successful freelist hits
169
ham_u64_t
freelist_hits
;
170
171
// number of freelist misses
172
ham_u64_t
freelist_misses
;
173
174
// number of successful cache hits
175
ham_u64_t
cache_hits
;
176
177
// number of cache misses
178
ham_u64_t
cache_misses
;
179
180
// number of blobs allocated
181
ham_u64_t
blob_total_allocated
;
182
183
// number of blobs read
184
ham_u64_t
blob_total_read
;
185
186
// (global) number of btree page splits
187
ham_u64_t
btree_smo_split
;
188
189
// (global) number of btree page merges
190
ham_u64_t
btree_smo_merge
;
191
192
// (global) number of extended keys
193
ham_u64_t
extended_keys
;
194
195
// (global) number of extended duplicate tables
196
ham_u64_t
extended_duptables
;
197
198
// number of flushed bytes in the log/journal
199
ham_u64_t
journal_bytes_flushed
;
200
201
}
ham_env_metrics_t
;
202
206
HAM_EXPORT
ham_status_t
HAM_CALLCONV
207
ham_env_get_metrics
(
ham_env_t
*env,
ham_env_metrics_t
*metrics);
208
213
HAM_EXPORT
ham_bool_t
HAM_CALLCONV
214
ham_is_debug
();
215
220
HAM_EXPORT
ham_bool_t
HAM_CALLCONV
221
ham_is_pro
();
222
227
#ifdef __cplusplus
228
}
// extern "C"
229
#endif
230
231
#endif
/* HAM_HAMSTERDB_INT_H__ */
Generated by
1.8.4