summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/ctx.c
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/ctx.c
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/ctx.c')
-rw-r--r--libglusterfs/src/ctx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c
index 1c707eb5dfd..1cf1b988590 100644
--- a/libglusterfs/src/ctx.c
+++ b/libglusterfs/src/ctx.c
@@ -49,6 +49,9 @@ glusterfs_ctx_new ()
ctx = NULL;
}
+ GF_ATOMIC_INIT (ctx->stats.max_dict_pairs, 0);
+ GF_ATOMIC_INIT (ctx->stats.total_pairs_used, 0);
+ GF_ATOMIC_INIT (ctx->stats.total_dicts_used, 0);
out:
return ctx;
}