projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove Ubuntu karmic from build
[idzebra-moved-to-github.git]
/
isamb
/
benchisamb.c
diff --git
a/isamb/benchisamb.c
b/isamb/benchisamb.c
index
e9aaba7
..
a726e62
100644
(file)
--- a/
isamb/benchisamb.c
+++ b/
isamb/benchisamb.c
@@
-1,8
+1,5
@@
-/* $Id: benchisamb.c,v 1.4 2006-12-11 10:02:14 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) 1994-2011 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
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>
#include <yaz/options.h>
#if HAVE_SYS_TIMES_H
#include <sys/times.h>
@@
-32,6
+32,7
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <string.h>
#include <yaz/log.h>
#include <yaz/xmalloc.h>
#include <string.h>
#include <yaz/log.h>
#include <yaz/xmalloc.h>
+#include <yaz/timing.h>
#include <idzebra/isamb.h>
#include <assert.h>
#include <idzebra/isamb.h>
#include <assert.h>
@@
-134,9
+135,9
@@
void bench_insert(ISAMB isb, int number_of_trees,
for (round = 0; round < number_of_rounds; round++)
{
for (round = 0; round < number_of_rounds; round++)
{
- zebra_timing_t t = zebra_timing_create();
+ yaz_timing_t t = yaz_timing_create();
- zebra_timing_start(t);
+ yaz_timing_start(t);
for (i = 0; i<number_of_trees; i++)
{
for (i = 0; i<number_of_trees; i++)
{
@@
-158,13
+159,13
@@
void bench_insert(ISAMB isb, int number_of_trees,
if (0)
isamb_dump(isb, isamc_p[i], log_pr);
}
if (0)
isamb_dump(isb, isamc_p[i], log_pr);
}
- zebra_timing_stop(t);
+ yaz_timing_stop(t);
printf("%3d %8.6f %5.2f %5.2f\n",
round+1,
printf("%3d %8.6f %5.2f %5.2f\n",
round+1,
- zebra_timing_get_real(t),
- zebra_timing_get_user(t),
- zebra_timing_get_sys(t));
- zebra_timing_destroy(&t);
+ yaz_timing_get_real(t),
+ yaz_timing_get_user(t),
+ yaz_timing_get_sys(t));
+ yaz_timing_destroy(&t);
}
xfree(isamc_p);
}
}
xfree(isamc_p);
}
@@
-186,7
+187,7
@@
int main(int argc, char **argv)
int number_of_items = 1000;
int number_of_isams = 1000;
int extra_size = 0;
int number_of_items = 1000;
int number_of_isams = 1000;
int extra_size = 0;
- zebra_timing_t t = 0;
+ yaz_timing_t t = 0;
while ((ret = options("z:r:n:i:", argv, argc, &arg)) != -2)
{
while ((ret = options("z:r:n:i:", argv, argc, &arg)) != -2)
{
@@
-222,9
+223,9
@@
int main(int argc, char **argv)
method.codec.reset = code_reset;
method.codec.stop = code_stop;
method.codec.reset = code_reset;
method.codec.stop = code_stop;
- t = zebra_timing_create();
+ t = yaz_timing_create();
- zebra_timing_start(t);
+ yaz_timing_start(t);
/* create block system */
bfs = bfs_create(0, 0);
/* create block system */
bfs = bfs_create(0, 0);
@@
-251,18
+252,19
@@
int main(int argc, char **argv)
/* exit block system */
bfs_destroy(bfs);
/* exit block system */
bfs_destroy(bfs);
- zebra_timing_stop(t);
+ yaz_timing_stop(t);
printf("Total %8.6f %5.2f %5.2f\n",
printf("Total %8.6f %5.2f %5.2f\n",
- zebra_timing_get_real(t),
- zebra_timing_get_user(t),
- zebra_timing_get_sys(t));
- zebra_timing_destroy(&t);
+ yaz_timing_get_real(t),
+ yaz_timing_get_user(t),
+ yaz_timing_get_sys(t));
+ yaz_timing_destroy(&t);
exit(0);
return 0;
}
/*
* Local variables:
* c-basic-offset: 4
exit(0);
return 0;
}
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab