Examples using Bib-1 use attributes
[idzebra-moved-to-github.git] / isamb / benchisamb.c
index 1773cdf..9f5ba9a 100644 (file)
@@ -1,8 +1,5 @@
-/* $Id: benchisamb.c,v 1.6 2007-01-15 15:10:17 adam Exp $
-   Copyright (C) 1995-2007
-   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 <config.h>
+#endif
 #include <yaz/options.h>
 #if HAVE_SYS_TIMES_H
 #include <sys/times.h>
@@ -132,7 +132,7 @@ 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++)
     {
         yaz_timing_t t = yaz_timing_create();
@@ -143,17 +143,17 @@ void bench_insert(ISAMB isb, int number_of_trees,
 
             /* 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)
@@ -188,7 +188,7 @@ int main(int argc, char **argv)
     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)
@@ -213,7 +213,7 @@ int main(int argc, char **argv)
             exit_usage();
         }
     }
-       
+
     /* setup method (attributes) */
     method.compare_item = compare_item;
     method.log_item = log_item;
@@ -224,7 +224,7 @@ int main(int argc, char **argv)
     method.codec.stop = code_stop;
 
     t = yaz_timing_create();
-    
+
     yaz_timing_start(t);
 
     /* create block system */
@@ -246,7 +246,7 @@ int main(int argc, char **argv)
     }
     bench_insert(isb, number_of_isams, number_of_rounds, number_of_items,
                  extra_size);
-    
+
     isamb_close(isb);
 
     /* exit block system */
@@ -264,6 +264,7 @@ int main(int argc, char **argv)
 /*
  * Local variables:
  * c-basic-offset: 4
+ * c-file-style: "Stroustrup"
  * indent-tabs-mode: nil
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab