X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=1b424e3c158782c5b9cc7508addf72cd88f80b58;hb=e05cb2631696372c6bdabcabe22401efe9645ab7;hp=99054132b8141959706c72d6fad80d787d7b2eaf;hpb=161aa7805930f6b91ccea027e4afa4ccce41c379;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index 9905413..1b424e3 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,4 +1,4 @@ -/* $Id: zebraapi.c,v 1.238 2006-12-18 23:40:07 adam Exp $ +/* $Id: zebraapi.c,v 1.240 2006-12-22 12:14:25 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -258,6 +258,7 @@ ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res) } } + zh->timing = zebra_timing_create(); zh->path_root = res_get (zh->global_res, "root"); zh->nmem = nmem_create(); zh->record_classes = recTypeClass_create (zh->global_res, zh->nmem); @@ -436,7 +437,7 @@ struct zebra_register *zebra_register_open(ZebraService zs, const char *name, sort_type = ZEBRA_SORT_TYPE_ISAMB; else { - yaz_log (YLOG_WARN, "bad_value for 'sort:'"); + yaz_log (YLOG_WARN, "bad_value for 'sortindex'"); ret = ZEBRA_FAIL; } @@ -581,8 +582,6 @@ ZEBRA_RES zebra_stop(ZebraService zs) { if (!zs) return ZEBRA_OK; - yaz_log (log_level, "zebra_stop"); - while (zs->sessions) { zebra_close (zs->sessions); @@ -596,6 +595,15 @@ ZEBRA_RES zebra_stop(ZebraService zs) recTypeClass_destroy(zs->record_classes); nmem_destroy(zs->nmem); res_close (zs->global_res); + + zebra_timing_stop(zs->timing); + yaz_log (YLOG_LOG, "zebra_stop: %4.2f %4.2f %4.2f", + zebra_timing_get_real(zs->timing), + zebra_timing_get_user(zs->timing), + zebra_timing_get_sys(zs->timing)); + + + zebra_timing_destroy(&zs->timing); xfree(zs); return ZEBRA_OK; }