74ca47
From a7b9a9ddbff47c2226e60e403374d5e451fac344 Mon Sep 17 00:00:00 2001
74ca47
From: Mark Reynolds <mreynolds@redhat.com>
74ca47
Date: Tue, 2 May 2017 13:48:33 -0400
74ca47
Subject: [PATCH] Ticket 48989 - fix perf counters
74ca47
74ca47
Description:  There was a copy & paste error where page_access_rate
74ca47
              was added, but it listed the wrong attribute name.  However,
74ca47
              the page_access_rate formula doesn't make sense, nor are
74ca47
              there more page stats to use from Berklely DB.  Because
74ca47
              of this I just removed page_access_rate.
74ca47
74ca47
https://pagure.io/389-ds-base/issue/48989
74ca47
74ca47
Reviewed by: firstyear(Thanks!)
74ca47
74ca47
(cherry picked from commit 18a77e957119bd9994833b7290747f99d73b3745)
74ca47
---
74ca47
 ldap/servers/slapd/back-ldbm/perfctrs.c | 3 ---
74ca47
 ldap/servers/slapd/back-ldbm/perfctrs.h | 1 -
74ca47
 2 files changed, 4 deletions(-)
74ca47
74ca47
diff --git a/ldap/servers/slapd/back-ldbm/perfctrs.c b/ldap/servers/slapd/back-ldbm/perfctrs.c
74ca47
index 5929dea..9132097 100644
74ca47
--- a/ldap/servers/slapd/back-ldbm/perfctrs.c
74ca47
+++ b/ldap/servers/slapd/back-ldbm/perfctrs.c
74ca47
@@ -165,7 +165,6 @@ void perfctrs_update(perfctrs_private *priv, DB_ENV *db_env)
74ca47
 		if (0 == ret) {
74ca47
 #define ONEG  1073741824
74ca47
 			perf->cache_size_bytes = mpstat->st_gbytes * ONEG + mpstat->st_bytes;
74ca47
-			perf->page_access_rate = mpstat->st_cache_hit + mpstat->st_cache_miss;			
74ca47
 			perf->cache_hit = mpstat->st_cache_hit;			
74ca47
 			perf->cache_try = mpstat->st_cache_hit + mpstat->st_cache_miss;			
74ca47
 			perf->page_create_rate = mpstat->st_page_create;			
74ca47
@@ -257,8 +256,6 @@ static SlapiLDBMPerfctrATMap perfctr_at_map[] = {
74ca47
 			offsetof( performance_counters, log_write_rate ) },
74ca47
 	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "longest-chain-length",
74ca47
 			offsetof( performance_counters, longest_chain_length ) },
74ca47
-	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "objects-locked",
74ca47
-			offsetof( performance_counters, page_access_rate ) },
74ca47
 	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "page-create-rate",
74ca47
 			offsetof( performance_counters, page_create_rate ) },
74ca47
 	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "page-read-rate",
74ca47
diff --git a/ldap/servers/slapd/back-ldbm/perfctrs.h b/ldap/servers/slapd/back-ldbm/perfctrs.h
74ca47
index 64c79e1..a6213ec 100644
74ca47
--- a/ldap/servers/slapd/back-ldbm/perfctrs.h
74ca47
+++ b/ldap/servers/slapd/back-ldbm/perfctrs.h
74ca47
@@ -32,7 +32,6 @@ struct _performance_counters {
74ca47
 	uint64_t    log_write_rate;
74ca47
 	uint64_t    log_bytes_since_checkpoint;
74ca47
 	uint64_t    cache_size_bytes;
74ca47
-	uint64_t    page_access_rate;
74ca47
 	uint64_t    cache_hit;
74ca47
 	uint64_t    cache_try;
74ca47
 	uint64_t    page_create_rate;
74ca47
-- 
74ca47
2.9.3
74ca47