sapling/eden/fs/store/IObjectStore.cpp
Chad Austin fc07c3b6e6 add an ObjectFetchContext interface
Summary:
Add a fetch context interface to ObjectStore that allows tracing cache
hits, backing store fetches, and fetch durations in the context of a
diff or checkout operation.

Reviewed By: simpkins

Differential Revision: D19135625

fbshipit-source-id: d0d8f134b1c89f7ba4971a404a46a69a1704ba5c
2020-02-05 13:15:01 -08:00

25 lines
546 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This software may be used and distributed according to the terms of the
* GNU General Public License version 2.
*/
#include "eden/fs/store/IObjectStore.h"
namespace {
using namespace facebook::eden;
class NullObjectFetchContext : public ObjectFetchContext {};
} // namespace
namespace facebook {
namespace eden {
ObjectFetchContext& ObjectFetchContext::getNullContext() {
static auto* p = new NullObjectFetchContext;
return *p;
}
} // namespace eden
} // namespace facebook