hamsterdb Embedded Database  2.1.7
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 
74 
76 #define HAM_PRINT_GRAPH 1
77 
90 ham_set_context_data(ham_db_t *db, void *data);
91 
107 
117 
130 #define HAM_METRICS_VERSION 7
131 
132 typedef struct ham_env_metrics_t {
133  // the version indicator - must be HAM_METRICS_VERSION
135 
136  // number of total allocations for the whole lifetime of the process
138 
139  // currently active allocations for the whole process
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)
146 
147  // peak usage of memory (for the whole process)
149 
150  // the heap size of this process
152 
153  // amount of pages fetched from disk
155 
156  // amount of pages written to disk
158 
159  // number of index pages in this Environment
161 
162  // number of blob pages in this Environment
164 
165  // number of page-manager pages in this Environment
167 
168  // number of successful freelist hits
170 
171  // number of freelist misses
173 
174  // number of successful cache hits
176 
177  // number of cache misses
179 
180  // number of blobs allocated
182 
183  // number of blobs read
185 
186  // (global) number of btree page splits
188 
189  // (global) number of btree page merges
191 
192  // (global) number of extended keys
194 
195  // (global) number of extended duplicate tables
197 
198  // number of flushed bytes in the log/journal
200 
202 
208 
214 ham_is_debug();
215 
221 ham_is_pro();
222 
227 #ifdef __cplusplus
228 } // extern "C"
229 #endif
230 
231 #endif /* HAM_HAMSTERDB_INT_H__ */