-/* $Id: benchisamb.c,v 1.5 2007-01-05 10:45:12 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
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <yaz/options.h>
#if HAVE_SYS_TIMES_H
#include <sys/times.h>
ri.step = 1;
ri.insertMode = 1;
ri.sz = sizeof(int) + 1 + extra_size;
-
+
for (round = 0; round < number_of_rounds; round++)
{
yaz_timing_t t = yaz_timing_create();
/* insert a number of entries */
ri.no = 0;
-
+
ri.val = (rand());
- if (RAND_MAX < 65536)
+ if (RAND_MAX < 65536)
ri.val = ri.val + 65536*rand();
// ri.val = number_of_elements * round;
ri.max = number_of_elements;
-
+
isamc_i.clientData = &ri;
isamc_i.read_item = code_read;
-
+
isamb_merge (isb, &isamc_p[i] , &isamc_i);
if (0)
int number_of_isams = 1000;
int extra_size = 0;
yaz_timing_t t = 0;
-
+
while ((ret = options("z:r:n:i:", argv, argc, &arg)) != -2)
{
switch(ret)
exit_usage();
}
}
-
+
/* setup method (attributes) */
method.compare_item = compare_item;
method.log_item = log_item;
method.codec.stop = code_stop;
t = yaz_timing_create();
-
+
yaz_timing_start(t);
/* create block system */
}
bench_insert(isb, number_of_isams, number_of_rounds, number_of_items,
extra_size);
-
+
isamb_close(isb);
/* exit block system */
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab