Skip to content

Commit

Permalink
Switch ThreadWheelTimekeeperHighRes to HeapTimekeeper
Browse files Browse the repository at this point in the history
Summary: `ThreadWheelTimekeeperHighRes` is being deprecated, since `HeapTimekeeper` is both more efficient and more accurate (see analysis in D49060468). `HeapTimekeeper` is already the default timekeeper for futures.

Reviewed By: stuclar

Differential Revision: D49318889

fbshipit-source-id: 9c44492df5d310f27e4a5f4b782c82c5e806b3eb
  • Loading branch information
ot authored and facebook-github-bot committed Sep 20, 2023
1 parent 5a04fb3 commit c25ff7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions mcrouter/routes/LatencyInjectionRoute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
#include "mcrouter/routes/LatencyInjectionRoute.h"

#include <folly/Singleton.h>
#include <folly/futures/HeapTimekeeper.h>

namespace facebook::memcache::mcrouter {

namespace {
folly::Singleton<folly::ThreadWheelTimekeeperHighRes>

struct McrouterTimekeeperTag {};
folly::Singleton<folly::HeapTimekeeper, McrouterTimekeeperTag>
timekeeperHighResSingleton_;
}

} // namespace

namespace detail {
folly::ReadMostlySharedPtr<folly::Timekeeper> getTimekeeperHighResSingleton() {
Expand Down
1 change: 0 additions & 1 deletion mcrouter/routes/LatencyInjectionRoute.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <folly/fibers/Baton.h>

#include <folly/experimental/ReadMostlySharedPtr.h>
#include <folly/experimental/ThreadWheelTimekeeperHighRes.h>

#include "mcrouter/config.h"
#include "mcrouter/lib/RouteHandleTraverser.h"
Expand Down

0 comments on commit c25ff7f

Please sign in to comment.