From 58fb17ae8845c42205b8d0488a091fb4b9a9f63a Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 17 Oct 2014 02:03:38 +0400 Subject: [PATCH] zkutil: additions [#METR-2944]. --- libs/libzkutil/src/ZooKeeper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libs/libzkutil/src/ZooKeeper.cpp b/libs/libzkutil/src/ZooKeeper.cpp index 0a27be38a0c..74a237453a3 100644 --- a/libs/libzkutil/src/ZooKeeper.cpp +++ b/libs/libzkutil/src/ZooKeeper.cpp @@ -610,6 +610,9 @@ ZooKeeper::GetFuture ZooKeeper::asyncGet(const std::string & path) }, future.task.get()); + ProfileEvents::increment(ProfileEvents::ZooKeeperGet); + ProfileEvents::increment(ProfileEvents::ZooKeeperTransactions); + if (code != ZOK) throw KeeperException(code, path); @@ -636,6 +639,9 @@ ZooKeeper::TryGetFuture ZooKeeper::asyncTryGet(const std::string & path) }, future.task.get()); + ProfileEvents::increment(ProfileEvents::ZooKeeperGet); + ProfileEvents::increment(ProfileEvents::ZooKeeperTransactions); + if (code != ZOK) throw KeeperException(code, path); @@ -662,6 +668,9 @@ ZooKeeper::ExistsFuture ZooKeeper::asyncExists(const std::string & path) }, future.task.get()); + ProfileEvents::increment(ProfileEvents::ZooKeeperExists); + ProfileEvents::increment(ProfileEvents::ZooKeeperTransactions); + if (code != ZOK) throw KeeperException(code, path); @@ -693,6 +702,9 @@ ZooKeeper::GetChildrenFuture ZooKeeper::asyncGetChildren(const std::string & pat }, future.task.get()); + ProfileEvents::increment(ProfileEvents::ZooKeeperGetChildren); + ProfileEvents::increment(ProfileEvents::ZooKeeperTransactions); + if (code != ZOK) throw KeeperException(code, path);