From 1e9d110fab41514a2ed19a73d532197aaa29b526 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Thu, 10 May 2012 09:01:33 +0200 Subject: [PATCH] Report session/operation nmem usage --- src/session.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- 1.7.10.4