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