summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs.h
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-05-30 14:27:16 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-06-05 12:44:28 +0000
commitd7105ba1652e548d9ba893e05f3d1fa29e8ee3b1 (patch)
tree0858e051d220ad8bddf80aee029be1fa3b09583e /libglusterfs/src/glusterfs.h
parenta9d3d0438ef93beb6ec3f895923db4418c0ab3df (diff)
core: add more information on dictionary usage
when you take the 'statedump', it shows the output like below ----- [dict] max-number-of-dict-pairs=13 total-pairs-used=41613 total-dict-used=12629 average-pairs-per-dict=3 ------ Updates #220 Change-Id: I71a7eda3a3cd23edf4483234f22f983923bbb081 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: https://review.gluster.org/4035 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'libglusterfs/src/glusterfs.h')
-rw-r--r--libglusterfs/src/glusterfs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 7eaeb0c7dbd..6feefb85e97 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -37,6 +37,7 @@
#include "lkowner.h"
#include "compat-uuid.h"
#include "refcount.h"
+#include "atomic.h"
#define GF_YES 1
#define GF_NO 0
@@ -522,6 +523,13 @@ struct _glusterfs_ctx {
struct gf_ctx_tw *tw; /* refcounted timer_wheel */
gf_lock_t volfile_lock;
+
+
+ struct {
+ gf_atomic_t max_dict_pairs;
+ gf_atomic_t total_pairs_used;
+ gf_atomic_t total_dicts_used;
+ } stats;
};
typedef struct _glusterfs_ctx glusterfs_ctx_t;