X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=index%2Fzebraapi.c;h=6ecea626dfa9f2edf8d0e00b978264010f9e4b38;hb=5a8a42bede922e70156e7b289db071592c71529b;hp=99054132b8141959706c72d6fad80d787d7b2eaf;hpb=161aa7805930f6b91ccea027e4afa4ccce41c379;p=idzebra-moved-to-github.git diff --git a/index/zebraapi.c b/index/zebraapi.c index 9905413..6ecea62 100644 --- a/index/zebraapi.c +++ b/index/zebraapi.c @@ -1,5 +1,5 @@ -/* $Id: zebraapi.c,v 1.238 2006-12-18 23:40:07 adam Exp $ - Copyright (C) 1995-2006 +/* $Id: zebraapi.c,v 1.242 2007-01-15 15:10:17 adam Exp $ + Copyright (C) 1995-2007 Index Data ApS This file is part of the Zebra server. @@ -258,6 +258,7 @@ ZebraService zebra_start_res(const char *configName, Res def_res, Res over_res) } } + zh->timing = yaz_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); + + yaz_timing_stop(zs->timing); + yaz_log (YLOG_LOG, "zebra_stop: %4.2f %4.2f %4.2f", + yaz_timing_get_real(zs->timing), + yaz_timing_get_user(zs->timing), + yaz_timing_get_sys(zs->timing)); + + + yaz_timing_destroy(&zs->timing); xfree(zs); return ZEBRA_OK; }