From: Adam Dickmeiss Date: Thu, 17 Apr 2008 12:04:05 +0000 (+0200) Subject: Added loop for record conversion to test performance. X-Git-Tag: v3.0.30~50 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=e6fc0b7b23620cd04801667b1921384f56a42fdb;p=yaz-moved-to-github.git Added loop for record conversion to test performance. --- diff --git a/test/tst_record_conv.c b/test/tst_record_conv.c index ac81620..42518b7 100644 --- a/test/tst_record_conv.c +++ b/test/tst_record_conv.c @@ -197,6 +197,22 @@ static int conv_convert_test(yaz_record_conv_t p, return ret; } +static int conv_convert_test_iter(yaz_record_conv_t p, + const char *input_record, + const char *output_expect_record, + int num_iter) +{ + int i; + int ret; + for (i = 0; i < num_iter; i++) + { + ret = conv_convert_test(p, input_record, output_expect_record); + if (!ret) + break; + } + return ret; +} + static void tst_convert1(void) { yaz_record_conv_t p = 0; @@ -307,7 +323,7 @@ static void tst_convert2(void) "/>" "", 0, &p)); - YAZ_CHECK(conv_convert_test(p, marcxml_rec, iso2709_rec)); + YAZ_CHECK(conv_convert_test_iter(p, marcxml_rec, iso2709_rec, 100)); yaz_record_conv_destroy(p); }