From 7ed734cd2fbccac903039ef91a9086763a39ace4 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 9 Jun 2004 12:13:03 +0000 Subject: [PATCH] Added small test of codec speed --- test/Makefile.am | 2 +- test/codec/Makefile.am | 11 +++++++++++ test/codec/tstcodec.c | 28 ++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 test/codec/Makefile.am create mode 100644 test/codec/tstcodec.c 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