X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Ftstisamb.c;h=be9823d3aa9ae95f45655fb9492a26e51863f6a6;hb=6ee446e1ec64b03521ffd54f0d3003686566d093;hp=4103211742341c54d93e550893b22907e5128ba7;hpb=4eaf00a0af4c40bd166e2224964319a58efafeaa;p=idzebra-moved-to-github.git diff --git a/isamb/tstisamb.c b/isamb/tstisamb.c index 4103211..be9823d 100644 --- a/isamb/tstisamb.c +++ b/isamb/tstisamb.c @@ -1,5 +1,5 @@ -/* $Id: tstisamb.c,v 1.26 2006-12-07 21:13:56 adam Exp $ - Copyright (C) 1995-2006 +/* $Id: tstisamb.c,v 1.28 2007-01-15 15:10:17 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -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