X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=isamb%2Ftstisamb.c;h=4eacd2a8b1995a941ce399bc4a9a5a5f5dbb98e2;hp=4103211742341c54d93e550893b22907e5128ba7;hb=97a7adeb9e5059463f039495cc01cfa448463a27;hpb=4eaf00a0af4c40bd166e2224964319a58efafeaa diff --git a/isamb/tstisamb.c b/isamb/tstisamb.c index 4103211..4eacd2a 100644 --- a/isamb/tstisamb.c +++ b/isamb/tstisamb.c @@ -1,8 +1,5 @@ -/* $Id: tstisamb.c,v 1.26 2006-12-07 21:13:56 adam Exp $ - Copyright (C) 1995-2006 - Index Data ApS - -This file is part of the Zebra server. +/* This file is part of the Zebra server. + Copyright (C) 1995-2008 Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -34,16 +31,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 +103,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