From: Dennis Schafroth Date: Thu, 10 May 2012 07:01:33 +0000 (+0200) Subject: Report session/operation nmem usage X-Git-Tag: v1.6.13~11 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=1e9d110fab41514a2ed19a73d532197aaa29b526;p=pazpar2-moved-to-github.git Report session/operation nmem usage --- diff --git a/src/session.c b/src/session.c index 54b82da..b37b358 100644 --- a/src/session.c +++ b/src/session.c @@ -689,6 +689,8 @@ enum pazpar2_error_code session_search(struct session *se, se->reclist = 0; se->settings_modified = 0; relevance_destroy(&se->relevance); + if (nmem_total(se->nmem)) + session_log(se, YLOG_DEBUG, "NMEN operation usage %zd", nmem_total(se->nmem)); nmem_reset(se->nmem); se->total_records = se->total_merged = 0; se->num_termlists = 0; @@ -885,6 +887,10 @@ void session_destroy(struct session *se) normalize_cache_destroy(se->normalize_cache); relevance_destroy(&se->relevance); reclist_destroy(se->reclist); + if (nmem_total(se->nmem)) + session_log(se, YLOG_DEBUG, "NMEN operation usage %zd", nmem_total(se->nmem)); + if (nmem_total(se->session_nmem)) + session_log(se, YLOG_DEBUG, "NMEN session usage %zd", nmem_total(se->session_nmem)); nmem_destroy(se->nmem); service_destroy(se->service); yaz_mutex_destroy(&se->session_mutex);