X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=isamb%2Fbenchisamb.c;h=e9aaba7f273b6f6dde9d0e28bbfa4b33527a4d17;hb=3fe5d30485d3fc95b24ee5e7dc75971447ecb5aa;hp=6b69f6ddd94200eda4754ed8c2c33d4942a8c3f7;hpb=413f72bc622b8dcd20504e269d8c0b69a4c421d9;p=idzebra-moved-to-github.git diff --git a/isamb/benchisamb.c b/isamb/benchisamb.c index 6b69f6d..e9aaba7 100644 --- a/isamb/benchisamb.c +++ b/isamb/benchisamb.c @@ -1,4 +1,4 @@ -/* $Id: benchisamb.c,v 1.2 2006-12-10 11:49:16 adam Exp $ +/* $Id: benchisamb.c,v 1.4 2006-12-11 10:02:14 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -51,8 +51,8 @@ int compare_item(const void *a, const void *b) { int ia, ib; - memcpy(&ia, a + 1, sizeof(int)); - memcpy(&ib, b + 1, sizeof(int)); + memcpy(&ia, (const char *) a + 1, sizeof(int)); + memcpy(&ib, (const char *) b + 1, sizeof(int)); if (ia > ib) return 1; if (ia < ib) @@ -134,22 +134,19 @@ void bench_insert(ISAMB isb, int number_of_trees, 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 + zebra_timing_t t = zebra_timing_create(); + + zebra_timing_start(t); for (i = 0; i