zrhoffman / rpms / 389-ds-base

Forked from rpms/389-ds-base 3 years ago
Clone

Blame SOURCES/0033-Ticket-48989-fix-perf-counters.patch

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