Skip to content

Commit 93109ff

Browse files
haowu14facebook-github-bot
authored andcommitted
Use cachelib/common counter visitor in navy
Summary: We have a CounterVisitor in navy namespace, which is the same type alias. In this diff, we point cachelib::navy::CounterVisitor to cachelib::util::CounterVisitor so we don't have two "different" types. Reviewed By: therealgymmy Differential Revision: D41032971 fbshipit-source-id: e53ab7eef504a3d7d052daf8ea03a6083b8c4b40
1 parent 3c9a3c8 commit 93109ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cachelib/navy/common/Types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <functional>
2323
#include <ostream>
2424

25+
#include "cachelib/common/PercentileStats.h"
2526
#include "cachelib/navy/common/Buffer.h"
2627
#include "cachelib/navy/common/Hash.h"
2728

@@ -61,9 +62,8 @@ enum class DestructorEvent {
6162
using DestructorCallback =
6263
std::function<void(HashedKey hk, BufferView value, DestructorEvent event)>;
6364

64-
// Export counters by visiting them in the object hierarchy
65-
using CounterVisitor =
66-
std::function<void(folly::StringPiece name, double count)>;
65+
// Get CounterVisitor into navy namespace.
66+
using CounterVisitor = util::CounterVisitor;
6767

6868
constexpr uint32_t kMaxKeySize{255};
6969

0 commit comments

Comments
 (0)