X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=isamb%2Fbenchisamb.c;h=9f5ba9ac7b9d1fd1f0eb4220c303f4c52c5fe166;hp=6d5391e2ce4f61e44514aeb8d81d901ebca2cf80;hb=f3f20a205132c39c9434b10086422c6b49b47faf;hpb=654dbcc899c70a1cb26d215796c6e3b8c4a46a58 diff --git a/isamb/benchisamb.c b/isamb/benchisamb.c index 6d5391e..9f5ba9a 100644 --- a/isamb/benchisamb.c +++ b/isamb/benchisamb.c @@ -1,8 +1,5 @@ -/* $Id: benchisamb.c,v 1.3 2006-12-10 20:59:52 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) 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 @@ -20,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #if HAVE_SYS_TIMES_H #include @@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include #include #include +#include #include #include @@ -131,54 +132,40 @@ void bench_insert(ISAMB isb, int number_of_trees, ri.step = 1; ri.insertMode = 1; ri.sz = sizeof(int) + 1 + extra_size; - + for (round = 0; round < number_of_rounds; round++) { -#if HAVE_SYS_TIMES_H -#if HAVE_SYS_TIME_H - struct tms tms1, tms2; - struct timeval start_time, end_time; - double usec; - times(&tms1); - gettimeofday(&start_time, 0); -#endif -#endif + yaz_timing_t t = yaz_timing_create(); + + yaz_timing_start(t); for (i = 0; i