zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone
Blob Blame History Raw
From a7b9a9ddbff47c2226e60e403374d5e451fac344 Mon Sep 17 00:00:00 2001
From: Mark Reynolds <mreynolds@redhat.com>
Date: Tue, 2 May 2017 13:48:33 -0400
Subject: [PATCH] Ticket 48989 - fix perf counters

Description:  There was a copy & paste error where page_access_rate
              was added, but it listed the wrong attribute name.  However,
              the page_access_rate formula doesn't make sense, nor are
              there more page stats to use from Berklely DB.  Because
              of this I just removed page_access_rate.

https://pagure.io/389-ds-base/issue/48989

Reviewed by: firstyear(Thanks!)

(cherry picked from commit 18a77e957119bd9994833b7290747f99d73b3745)
---
 ldap/servers/slapd/back-ldbm/perfctrs.c | 3 ---
 ldap/servers/slapd/back-ldbm/perfctrs.h | 1 -
 2 files changed, 4 deletions(-)

diff --git a/ldap/servers/slapd/back-ldbm/perfctrs.c b/ldap/servers/slapd/back-ldbm/perfctrs.c
index 5929dea..9132097 100644
--- a/ldap/servers/slapd/back-ldbm/perfctrs.c
+++ b/ldap/servers/slapd/back-ldbm/perfctrs.c
@@ -165,7 +165,6 @@ void perfctrs_update(perfctrs_private *priv, DB_ENV *db_env)
 		if (0 == ret) {
 #define ONEG  1073741824
 			perf->cache_size_bytes = mpstat->st_gbytes * ONEG + mpstat->st_bytes;
-			perf->page_access_rate = mpstat->st_cache_hit + mpstat->st_cache_miss;			
 			perf->cache_hit = mpstat->st_cache_hit;			
 			perf->cache_try = mpstat->st_cache_hit + mpstat->st_cache_miss;			
 			perf->page_create_rate = mpstat->st_page_create;			
@@ -257,8 +256,6 @@ static SlapiLDBMPerfctrATMap perfctr_at_map[] = {
 			offsetof( performance_counters, log_write_rate ) },
 	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "longest-chain-length",
 			offsetof( performance_counters, longest_chain_length ) },
-	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "objects-locked",
-			offsetof( performance_counters, page_access_rate ) },
 	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "page-create-rate",
 			offsetof( performance_counters, page_create_rate ) },
 	{ SLAPI_LDBM_PERFCTR_AT_PREFIX "page-read-rate",
diff --git a/ldap/servers/slapd/back-ldbm/perfctrs.h b/ldap/servers/slapd/back-ldbm/perfctrs.h
index 64c79e1..a6213ec 100644
--- a/ldap/servers/slapd/back-ldbm/perfctrs.h
+++ b/ldap/servers/slapd/back-ldbm/perfctrs.h
@@ -32,7 +32,6 @@ struct _performance_counters {
 	uint64_t    log_write_rate;
 	uint64_t    log_bytes_since_checkpoint;
 	uint64_t    cache_size_bytes;
-	uint64_t    page_access_rate;
 	uint64_t    cache_hit;
 	uint64_t    cache_try;
 	uint64_t    page_create_rate;
-- 
2.9.3