You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2014/04/30 19:50:13 UTC
git commit: Improved timing accuracy in the Registrar.
Repository: mesos
Updated Branches:
refs/heads/master 6127137c7 -> 3e6d28ff0
Improved timing accuracy in the Registrar.
Review: https://reviews.apache.org/r/20897
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/3e6d28ff
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/3e6d28ff
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/3e6d28ff
Branch: refs/heads/master
Commit: 3e6d28ff084c01850acf9fcbae2c8be16cb7d8cd
Parents: 6127137
Author: Benjamin Mahler <bm...@twitter.com>
Authored: Wed Apr 30 09:46:30 2014 -0700
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Wed Apr 30 09:49:22 2014 -0700
----------------------------------------------------------------------
src/master/registrar.cpp | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/3e6d28ff/src/master/registrar.cpp
----------------------------------------------------------------------
diff --git a/src/master/registrar.cpp b/src/master/registrar.cpp
index 79d4891..e4b0b39 100644
--- a/src/master/registrar.cpp
+++ b/src/master/registrar.cpp
@@ -275,8 +275,7 @@ Future<Registry> RegistrarProcess::recover(const MasterInfo& info)
LOG(INFO) << "Recovering registrar";
if (recovered.isNone()) {
- metrics.state_fetch.start();
- state->fetch<Registry>("registry")
+ metrics.state_fetch.time(state->fetch<Registry>("registry"))
.after(flags.registry_fetch_timeout,
lambda::bind(
&timeout<Variable<Registry> >,
@@ -297,7 +296,6 @@ void RegistrarProcess::_recover(
const Future<Variable<Registry> >& recovery)
{
updating = false;
- metrics.state_fetch.stop();
CHECK(!recovery.isPending());
@@ -394,9 +392,8 @@ void RegistrarProcess::update()
(*operation)(®istry, &slaveIDs, flags.registry_strict);
}
- // Perform the store!
- metrics.state_store.start();
- state->store(variable.get().mutate(registry))
+ // Perform the store, and time the operation.
+ metrics.state_store.time(state->store(variable.get().mutate(registry)))
.after(flags.registry_store_timeout,
lambda::bind(
&timeout<Option<Variable<Registry> > >,
@@ -415,7 +412,6 @@ void RegistrarProcess::_update(
deque<Owned<Operation> > applied)
{
updating = false;
- metrics.state_store.stop();
// Set the variable if the storage operation succeeded.
if (!store.isReady()) {