summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2017-10-11 15:08:49 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-12-06 19:59:22 +0000
commit7f2e67d40d1006e88fda86eb04699c15db3440ee (patch)
tree15372ef72fd8c4c8f01eac370cac0cb263280568 /libglusterfs/src/xlator.h
parent349a55c5ef5c3a5aaee37b547b545df94fc10faf (diff)
metrics: provide options to dump metrics from xlators
* Introduce xlator methods to allow dumping of metrics * Separate options to get the metrics dumped in a path Updates #168 Change-Id: I7df80df33b71d6f449f03c2332665b4a45f6ddf2 Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 81199bd1809..8a5ee819e5c 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -982,6 +982,8 @@ struct _xlator {
int32_t (*init) (xlator_t *this);
int32_t (*reconfigure) (xlator_t *this, dict_t *options);
int32_t (*mem_acct_init) (xlator_t *this);
+ int32_t (*dump_metrics) (xlator_t *this, int fd);
+
event_notify_fn_t notify;
gf_loglevel_t loglevel; /* Log level for translator */
@@ -1071,6 +1073,9 @@ typedef struct {
optional. called during translator initialization */
int32_t (*mem_acct_init) (xlator_t *this);
+ /* dump_metrics(): used for providing internal metrics. optional */
+ int32_t (*dump_metrics) (xlator_t *this, int fd);
+
/* notify(): used for handling the notification of events from either
the parent or child in the graph. optional. */
event_notify_fn_t notify;