IDZEBRA
2.2.7
|
#include <stdlib.h>
#include <string.h>
#include <yaz/log.h>
#include <yaz/xmalloc.h>
#include <idzebra/isamb.h>
#include <assert.h>
Go to the source code of this file.
Data Structures | |
struct | read_info |
struct | random_read_info |
Functions | |
static void | log_item (int level, const void *b, const char *txt) |
static void | log_pr (const char *txt) |
int | compare_item (const void *a, const void *b) |
void * | code_start (void) |
void | code_item (void *p, char **dst, const char **src) |
void | code_reset (void *p) |
void | code_stop (void *p) |
int | code_read (void *vp, char **dst, int *insertMode) |
void | tst_insert (ISAMB isb, int n) |
void | tst_forward (ISAMB isb, int n) |
void | tst_x (ISAMB isb) |
void | tst_append (ISAMB isb, int n) |
int | tst_random_read (void *vp, char **dst, int *insertMode) |
void | tst_random (ISAMB isb, int n, int rounds, int max_dups) |
void | tst_minsert (ISAMB isb, int n) |
static void | identical_keys_tests (ISAMB isb) |
int | main (int argc, char **argv) |
Variables | |
static int | log_level = 0 |
void code_item | ( | void * | p, |
char ** | dst, | ||
const char ** | src | ||
) |
Definition at line 69 of file tstisamb.c.
Referenced by main().
int code_read | ( | void * | vp, |
char ** | dst, | ||
int * | insertMode | ||
) |
Definition at line 92 of file tstisamb.c.
References read_info::insertMode, log_level, read_info::max, read_info::no, read_info::step, and read_info::val.
Referenced by tst_append(), tst_forward(), tst_insert(), tst_minsert(), and tst_x().
void code_reset | ( | void * | p | ) |
Definition at line 76 of file tstisamb.c.
Referenced by main().
void* code_start | ( | void | ) |
Definition at line 64 of file tstisamb.c.
Referenced by main().
void code_stop | ( | void * | p | ) |
Definition at line 79 of file tstisamb.c.
Referenced by main().
int compare_item | ( | const void * | a, |
const void * | b | ||
) |
Definition at line 51 of file tstisamb.c.
Referenced by main().
|
static |
Definition at line 505 of file tstisamb.c.
References tst_minsert(), and tst_random().
Referenced by main().
|
static |
|
static |
Definition at line 46 of file tstisamb.c.
References log_level.
Referenced by tst_insert(), tst_minsert(), and tst_random().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 533 of file tstisamb.c.
References bf_reset(), bfs_create(), bfs_destroy(), code_item(), code_reset(), code_start(), code_stop(), ISAMC_M_s::codec, compare_item(), ISAMC_M_s::compare_item, ISAM_CODEC::decode, ISAM_CODEC::encode, identical_keys_tests(), isamb_close(), isamb_open(), log_item(), ISAMC_M_s::log_item, ISAM_CODEC::reset, ISAM_CODEC::start, ISAM_CODEC::stop, tst_append(), tst_forward(), tst_insert(), and tst_x().
void tst_append | ( | ISAMB | isb, |
int | n | ||
) |
Definition at line 287 of file tstisamb.c.
References ISAMC_I_s::clientData, code_read(), read_info::insertMode, isamb_merge(), read_info::max, read_info::no, ISAMC_I_s::read_item, read_info::step, and read_info::val.
Referenced by main().
void tst_forward | ( | ISAMB | isb, |
int | n | ||
) |
Definition at line 201 of file tstisamb.c.
References ISAMC_I_s::clientData, code_read(), read_info::insertMode, isamb_merge(), isamb_pp_close(), isamb_pp_forward(), isamb_pp_open(), isamb_unlink(), read_info::max, read_info::no, ISAMC_I_s::read_item, read_info::step, and read_info::val.
Referenced by main().
void tst_insert | ( | ISAMB | isb, |
int | n | ||
) |
Definition at line 114 of file tstisamb.c.
References ISAMC_I_s::clientData, code_read(), read_info::insertMode, isamb_dump(), isamb_merge(), isamb_pp_close(), isamb_pp_open(), isamb_pp_read(), log_level, log_pr(), read_info::max, read_info::no, ISAMC_I_s::read_item, read_info::step, and read_info::val.
Referenced by main().
void tst_minsert | ( | ISAMB | isb, |
int | n | ||
) |
Definition at line 458 of file tstisamb.c.
References ISAMC_I_s::clientData, code_read(), read_info::insertMode, isamb_dump(), isamb_merge(), log_pr(), read_info::max, read_info::no, ISAMC_I_s::read_item, read_info::step, and read_info::val.
Referenced by identical_keys_tests().
void tst_random | ( | ISAMB | isb, |
int | n, | ||
int | rounds, | ||
int | max_dups | ||
) |
Definition at line 351 of file tstisamb.c.
References ISAMC_I_s::clientData, random_read_info::delta, random_read_info::idx, isamb_dump(), isamb_merge(), isamb_pp_close(), isamb_pp_open(), isamb_pp_read(), random_read_info::level, log_pr(), random_read_info::max, ISAMC_I_s::read_item, and tst_random_read().
Referenced by identical_keys_tests().
int tst_random_read | ( | void * | vp, |
char ** | dst, | ||
int * | insertMode | ||
) |
Definition at line 320 of file tstisamb.c.
References random_read_info::delta, random_read_info::idx, random_read_info::level, and random_read_info::max.
Referenced by tst_random().
void tst_x | ( | ISAMB | isb | ) |
Definition at line 260 of file tstisamb.c.
References ISAMC_I_s::clientData, code_read(), read_info::insertMode, isamb_merge(), read_info::max, read_info::no, ISAMC_I_s::read_item, read_info::step, and read_info::val.
Referenced by main().
|
static |
Definition at line 37 of file tstisamb.c.
Referenced by code_read(), log_item(), log_pr(), and tst_insert().