X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fbenchmark.c;h=95ca0535126ef60f45f11d93ae75ff7059f0ede8;hb=4e82b831a8ac31e25b246a631acde354d8161688;hp=c38eb9b15db4386f38570c956c01c19e75ec2a6e;hpb=d57c9b0a346d64f0ed2a1003d90365794564e0b6;p=yaz-moved-to-github.git diff --git a/util/benchmark.c b/util/benchmark.c index c38eb9b..95ca053 100644 --- a/util/benchmark.c +++ b/util/benchmark.c @@ -1,5 +1,5 @@ -/* $Id: benchmark.c,v 1.5 2004-05-19 05:32:47 oleg Exp $ - * Copyright (C) 2003-2004 Index Data Aps +/* $Id: benchmark.c,v 1.7 2005-01-15 19:47:15 adam Exp $ + * Copyright (C) 1995-2005, Index Data ApS * * This file is part of the YAZ toolkit. * @@ -39,9 +39,7 @@ struct options { static int test(char *host, int port); -#ifndef HAVE_DPRINTF -static void dprintf(int level, char *fmt, ...); -#endif +static void db_printf(int level, char *fmt, ...); int main(int argc, char **argv) { @@ -85,12 +83,12 @@ int main(int argc, char **argv) port = atoi(argv[optind+1]); for (i = 0; i < options.nconnect; i++) { - dprintf(2, "iteration %d of %d", i+1, options.nconnect); + db_printf(2, "iteration %d of %d", i+1, options.nconnect); ok = test(host, port); if (ok) nok++; } - dprintf(1, "passed %d of %d tests", nok, options.nconnect); + db_printf(1, "passed %d of %d tests", nok, options.nconnect); if (nok < options.nconnect) printf("Failed %d of %d tests\n", options.nconnect-nok, options.nconnect); @@ -116,8 +114,7 @@ static int test(char *host, int port) return 1; } -#ifndef HAVE_DPRINTF -static void dprintf(int level, char *fmt, ...) +static void db_printf(int level, char *fmt, ...) { va_list ap; @@ -130,4 +127,3 @@ static void dprintf(int level, char *fmt, ...) fputc('\n', stderr); va_end(ap); } -#endif