From: Adam Dickmeiss Date: Wed, 9 Jun 2004 12:13:03 +0000 (+0000) Subject: Added small test of codec speed X-Git-Tag: ZEBRA.1.3.16~59 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=7ed734cd2fbccac903039ef91a9086763a39ace4;p=idzebra-moved-to-github.git Added small test of codec speed --- diff --git a/test/Makefile.am b/test/Makefile.am index 670f307..f61aaba 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS=api gils malxml config usmarc dmoz xpath sort xelm cddb \ +SUBDIRS=codec api gils malxml config usmarc dmoz xpath sort xelm cddb \ rusmarc zsh marcxml charmap diff --git a/test/codec/Makefile.am b/test/codec/Makefile.am new file mode 100644 index 0000000..2c5d3f0 --- /dev/null +++ b/test/codec/Makefile.am @@ -0,0 +1,11 @@ +# $Id: Makefile.am,v 1.1 2004-06-09 12:13:03 adam Exp $ + +TESTS = tstcodec + +tstcodec_SOURCES = tstcodec.c + +noinst_PROGRAMS = tstcodec + +AM_CPPFLAGS = -I$(top_srcdir)/include $(YAZINC) + +LDADD = ../../index/libzebra.a $(YAZLIB) $(TCL_LIB) diff --git a/test/codec/tstcodec.c b/test/codec/tstcodec.c new file mode 100644 index 0000000..029cb50 --- /dev/null +++ b/test/codec/tstcodec.c @@ -0,0 +1,28 @@ +#include "../index/index.h" + + +void tst_encode(int num) +{ + struct it_key key; + int i; + void *codec_handle =iscz1_code_start(ISAMC_ENCODE); + + for (i = 0; i