X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Ftstisamb.c;h=7fe7d59d8328f02a77ec4c3670295eccea186f58;hb=3fe5d30485d3fc95b24ee5e7dc75971447ecb5aa;hp=4103211742341c54d93e550893b22907e5128ba7;hpb=4eaf00a0af4c40bd166e2224964319a58efafeaa;p=idzebra-moved-to-github.git diff --git a/isamb/tstisamb.c b/isamb/tstisamb.c index 4103211..7fe7d59 100644 --- a/isamb/tstisamb.c +++ b/isamb/tstisamb.c @@ -1,4 +1,4 @@ -/* $Id: tstisamb.c,v 1.26 2006-12-07 21:13:56 adam Exp $ +/* $Id: tstisamb.c,v 1.27 2006-12-09 08:03:57 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -34,16 +34,18 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include +static int log_level = 0; + static void log_item(int level, const void *b, const char *txt) { int x; memcpy(&x, b, sizeof(int)); - yaz_log(YLOG_DEBUG, "%s %d", txt, x); + yaz_log(log_level, "%s %d", txt, x); } static void log_pr(const char *txt) { - yaz_log(YLOG_DEBUG, "%s", txt); + yaz_log(log_level, "%s", txt); } int compare_item(const void *a, const void *b) @@ -104,70 +106,11 @@ int code_read(void *vp, char **dst, int *insertMode) *insertMode = ri->insertMode; #if 0 - yaz_log(YLOG_LOG, "%d %5d", ri->insertMode, x); + yaz_log(log_level, "%d %5d", ri->insertMode, x); #endif return 1; } -void bench_insert(ISAMB isb, int number_of_trees, - int number_of_rounds, int number_of_elements) -{ - ISAMC_I isamc_i; - ISAM_P *isamc_p = xmalloc(sizeof(ISAM_P) * number_of_trees); - struct read_info ri; - int round, i; - - for (i = 0; i